diff options
author | Ermal <eri@pfsense.org> | 2012-11-22 09:12:26 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-11-22 09:17:36 +0000 |
commit | 080b4ce1b56ba46982aad503a96a583961e5069f (patch) | |
tree | cab4d654c1eab75682dfd541507934cee082dfb0 /etc/rc | |
parent | 8eae2d032e04a179a02185001ad29bb4a02db576 (diff) | |
download | pfsense-080b4ce1b56ba46982aad503a96a583961e5069f.zip pfsense-080b4ce1b56ba46982aad503a96a583961e5069f.tar.gz |
Create these dirs earlier rather than later to avoid the errors reported on http://forum.pfsense.org/index.php/topic,55998.0.html
Diffstat (limited to 'etc/rc')
-rwxr-xr-x | etc/rc | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -167,6 +167,13 @@ if [ "$PLATFORM" = "cdrom" ] ; then echo "done." fi +# make some directories in /var +/bin/mkdir -p $varrunpath /var/log /var/etc /var/db/entropy /var/at/jobs/ /var/empty 2>/dev/null +/bin/rm -rf $varrunpath/* +if [ "$PLATFORM" != "pfSense" ]; then + /bin/rm /var/log/* 2>/dev/null +fi + # Cleanup configuration files from previous instance /bin/rm -rf /var/etc/* @@ -184,6 +191,9 @@ if [ "$PLATFORM" = "nanobsd" ] ; then fi # Repair symlinks if they are broken +if [ -f /etc/newsyslog.conf ]; then + /bin/rm -f /etc/newsyslog.conf +fi if [ ! -L /etc/syslog.conf ]; then /bin/rm -rf /etc/syslog.conf if [ ! -f /var/etc/syslog.conf ]; then @@ -243,21 +253,11 @@ trap "echo 'Reboot interrupted'; exit 1" 3 # Remove old nameserver resolution files /bin/rm -f /var/etc/nameserver* -if [ -f /etc/newsyslog.conf ]; then - /bin/rm -f /etc/newsyslog.conf -fi # Create uploadbar tmp directory /bin/mkdir -p /tmp/uploadbar /bin/chmod 0777 /tmp/uploadbar -# make some directories in /var -/bin/mkdir -p $varrunpath /var/log /var/etc /var/db/entropy /var/at/jobs/ /var/empty 2>/dev/null -/bin/rm -rf $varrunpath/* -if [ "$PLATFORM" != "pfSense" ]; then - /bin/rm /var/log/* 2>/dev/null -fi - echo -n "." DISABLESYSLOGCLOG=`/usr/bin/grep -c disablesyslogclog /cf/conf/config.xml` ENABLEFIFOLOG=`/usr/bin/grep -c usefifolog /cf/conf/config.xml` |