summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-11-20 16:22:17 +0000
committerErmal <eri@pfsense.org>2012-11-20 16:22:17 +0000
commit9e9bc51c3267f2e961649d7f3f6a730d3fc8962c (patch)
tree11623525e17d425d39ba86255fa65c2384b41bcd /etc
parent344016a85ef63b0cde98a156723ad286bfabef19 (diff)
downloadpfsense-9e9bc51c3267f2e961649d7f3f6a730d3fc8962c.zip
pfsense-9e9bc51c3267f2e961649d7f3f6a730d3fc8962c.tar.gz
Remove all previous configurations stored on /var/etc during a bootup to avoid confusion
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index 538fc43..fe2f0b5 100755
--- a/etc/rc
+++ b/etc/rc
@@ -167,6 +167,9 @@ if [ "$PLATFORM" = "cdrom" ] ; then
echo "done."
fi
+# Cleanup configuration files from previous instance
+/bin/rm -rf /var/etc/*
+
echo -n "Creating symlinks..."
# Make sure symlink is correct on embedded
if [ "$PLATFORM" = "embedded" ] ; then
@@ -183,6 +186,9 @@ fi
# Repair symlinks if they are broken
if [ ! -L /etc/syslog.conf ]; then
/bin/rm -rf /etc/syslog.conf
+ if [ ! -f /var/etc/syslog.conf ]; then
+ touch /var/etc/syslog.conf
+ fi
/bin/ln -s /var/etc/syslog.conf /etc/syslog.conf
fi
OpenPOWER on IntegriCloud