summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/etc/pfSense-rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etc/pfSense-rc b/src/etc/pfSense-rc
index 4b9990d..0bb0f2b 100755
--- a/src/etc/pfSense-rc
+++ b/src/etc/pfSense-rc
@@ -228,7 +228,12 @@ SWAPDEVICE=`/bin/cat /etc/fstab | /usr/bin/grep swap | /usr/bin/cut -f1`
# make some directories in /var
/bin/mkdir -p $varrunpath /var/log /var/etc /var/db/entropy /var/db/rrd /var/at/jobs/ /var/empty /var/log/nginx 2>/dev/null
+
+# turn off the immutable flag, set /var/empty to read-only, make it immutable again
+chflags noschg /var/empty
chmod 0555 /var/empty
+chflags schg /var/empty
+
/bin/rm -rf $varrunpath/*
# Cleanup configuration files from previous instance
OpenPOWER on IntegriCloud