aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAlexander Wilke <nachtfalkeaw@web.de>2012-03-09 23:14:31 +0100
committerAlexander Wilke <nachtfalkeaw@web.de>2012-03-09 23:14:31 +0100
commit39948022826acbd5f592000e8d7d82a19e1e8732 (patch)
treeab2f7733469378fa70dbcd5dd1e111cd70b71041 /config
parent29d987a95fefacd6df0367fea7311499535800b9 (diff)
downloadpfsense-packages-39948022826acbd5f592000e8d7d82a19e1e8732.tar.gz
pfsense-packages-39948022826acbd5f592000e8d7d82a19e1e8732.tar.bz2
pfsense-packages-39948022826acbd5f592000e8d7d82a19e1e8732.zip
some checks on missing folders on nanobsd systems after reboot in /var/log. should fix:
http://redmine.pfsense.org/issues/2256
Diffstat (limited to 'config')
-rw-r--r--config/freeradius2/freeradius.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index 523fd1cd..21beb20f 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -149,7 +149,15 @@ function freeradius_install_command() {
function freeradius_settings_resync() {
global $config;
$conf = '';
-
+
+ // We do some checks of some folders which will be deleted after reboot on nanobsd systems
+ if (!file_exists("/var/log/radacct/")) { exec("mkdir /var/log/radacct"); }
+ if (!file_exists("/var/log/radacct/datacounter/")) { exec("mkdir /var/log/radacct/datacounter && mkdir /var/log/radacct/datacounter/daily && mkdir /var/log/radacct/datacounter/weekly && mkdir /var/log/radacct/datacounter/monthly && mkdir /var/log/radacct/datacounter/forever"); }
+ if (!file_exists("/var/log/radacct/timecounter/")) { exec("mkdir /var/log/radacct/timecounter"); }
+ if (!file_exists("/var/log/radutmp")) { exec("touch /var/log/radutmp"); }
+ if (!file_exists("/var/log/radwtmp")) { exec("touch /var/log/radwtmp"); }
+ if (!file_exists("/var/log/radacct/")) { exec("chown -R root:wheel /var/log/radacct"); }
+
$varsettings = $config['installedpackages']['freeradiussettings']['config'][0];
// Variables: General configuration