diff options
author | Ermal <eri@pfsense.org> | 2012-03-12 10:32:41 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-03-12 10:32:57 +0000 |
commit | e8197e56f360f222d03de24f8b66fe5125123c30 (patch) | |
tree | e6a13ab8285d1bd69e82c71299078b662a3078dc | |
parent | 80b86de5887e229848bd72bc80481e2b8ddb59d4 (diff) | |
download | pfsense-e8197e56f360f222d03de24f8b66fe5125123c30.zip pfsense-e8197e56f360f222d03de24f8b66fe5125123c30.tar.gz |
Do not wipe logs on reboot on full install
-rwxr-xr-x | etc/rc | 72 |
1 files changed, 54 insertions, 18 deletions
@@ -248,8 +248,10 @@ trap "echo 'Reboot interrupted'; exit 1" 3 # make some directories in /var /bin/mkdir -p /var/run /var/log /var/etc /var/db/entropy /var/at/jobs/ /var/empty 2>/dev/null -/bin/rm /var/log/* 2>/dev/null /bin/rm -rf /var/run/* +if [ "$PLATFORM" != "pfSense" ]; then + /bin/rm /var/log/* 2>/dev/null +fi echo -n "." DISABLESYSLOGCLOG=`cat /cf/conf/config.xml | grep disablesyslogclog | wc -l | awk '{ print $1 }'` @@ -291,23 +293,57 @@ else /usr/sbin/fifolog_create -s 50688 /var/log/ntpd.log /usr/sbin/fifolog_create -s 50688 /var/log/apinger.log else - /usr/sbin/clog -i -s 512144 /var/log/system.log - /usr/sbin/clog -i -s 512144 /var/log/filter.log - /usr/sbin/clog -i -s 65535 /var/log/dhcpd.log - /usr/sbin/clog -i -s 65535 /var/log/vpn.log - /usr/sbin/clog -i -s 50688 /var/log/pptps.log - /usr/sbin/clog -i -s 50688 /var/log/poes.log - /usr/sbin/clog -i -s 50688 /var/log/l2tps.log - /usr/sbin/clog -i -s 65535 /var/log/openvpn.log - /usr/sbin/clog -i -s 65535 /var/log/portalauth.log - /usr/sbin/clog -i -s 65535 /var/log/ipsec.log - /usr/sbin/clog -i -s 65535 /var/log/ppp.log - /usr/sbin/clog -i -s 65535 /var/log/slbd.log - /usr/sbin/clog -i -s 65535 /var/log/lighttpd.log - /usr/sbin/clog -i -s 65535 /var/log/ntpd.log - /usr/sbin/clog -i -s 65535 /var/log/relayd.log - /usr/sbin/clog -i -s 65535 /var/log/wireless.log - /usr/sbin/clog -i -s 65535 /var/log/apinger.log + if [ ! -f /var/log/system.log ]; then + /usr/sbin/clog -i -s 512144 /var/log/system.log + fi + if [ ! -f /var/log/filter.log ]; then + /usr/sbin/clog -i -s 512144 /var/log/filter.log + fi + if [ ! -f /var/log/dhcpd.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/dhcpd.log + fi + if [ ! -f /var/log/vpn.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/vpn.log + fi + if [ ! -f /var/log/pptps.log ]; then + /usr/sbin/clog -i -s 50688 /var/log/pptps.log + fi + if [ ! -f /var/log/poes.log ]; then + /usr/sbin/clog -i -s 50688 /var/log/poes.log + fi + if [ ! -f /var/log/l2tps.log ]; then + /usr/sbin/clog -i -s 50688 /var/log/l2tps.log + fi + if [ ! -f /var/log/openvpn.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/openvpn.log + fi + if [ ! -f /var/log/portalauth.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/portalauth.log + fi + if [ ! -f /var/log/ipsec.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/ipsec.log + fi + if [ ! -f /var/log/ppp.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/ppp.log + fi + if [ ! -f /var/log/slbd.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/slbd.log + fi + if [ ! -f /var/log/lighttpd.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/lighttpd.log + fi + if [ ! -f /var/log/ntpd.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/ntpd.log + fi + if [ ! -f /var/log/relayd.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/relayd.log + fi + if [ ! -f /var/log/wireless.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/wireless.log + fi + if [ ! -f /var/log/apinger.log ]; then + /usr/sbin/clog -i -s 65535 /var/log/apinger.log + fi fi fi # change permissions on newly created fifolog files. |