summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-04-01 00:08:59 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-04-01 00:08:59 -0400
commit8274afc77bfdefa6893472ae486f8e2c6b06291a (patch)
tree9fcecb8152a1f9dc5d4765675d8ad30fe1e78008 /etc/rc
parentfe5f3b38db0284ee8dd8280632e2704c80385b8c (diff)
downloadpfsense-8274afc77bfdefa6893472ae486f8e2c6b06291a.zip
pfsense-8274afc77bfdefa6893472ae486f8e2c6b06291a.tar.gz
Use clog or fifolog
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc48
1 files changed, 25 insertions, 23 deletions
diff --git a/etc/rc b/etc/rc
index 63ffa16..4851fab 100755
--- a/etc/rc
+++ b/etc/rc
@@ -233,29 +233,31 @@ if [ "$DISABLESYSLOGCLOG" -gt "0" ]; then
touch /var/log/lighttpd.log
touch /var/log/ntpd.log
else
- # generate fifolog files
- /usr/sbin/fifolog_create -s 511488 /var/log/system.log
- /usr/sbin/fifolog_create -s 511488 /var/log/filter.log
- /usr/sbin/fifolog_create -s 50688 /var/log/dhcpd.log
- /usr/sbin/fifolog_create -s 50688 /var/log/vpn.log
- /usr/sbin/fifolog_create -s 50688 /var/log/openvpn.log
- /usr/sbin/fifolog_create -s 50688 /var/log/portalauth.log
- /usr/sbin/fifolog_create -s 50688 /var/log/ipsec.log
- /usr/sbin/fifolog_create -s 50688 /var/log/relayd.log
- /usr/sbin/fifolog_create -s 50688 /var/log/lighttpd.log
- /usr/sbin/fifolog_create -s 50688 /var/log/ntpd.log
- # Echo date to log files (start time)
- /bin/date | /usr/sbin/fifolog_writer /var/log/system.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/filter.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/dhcpd.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/vpn.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/openvpn.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/portalauth.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/ipsec.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/relayd.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/lighttpd.log
- /bin/date | /usr/sbin/fifolog_writer /var/log/ntpd.log
-
+ ENABLEFIFOLOG=`cat /cf/conf/config.xml | grep usefifolog | wc -l | awk '{ print $1 }'`
+ if [ "$ENABLEFIFOLOG" -gt "0" ]; then
+ # generate fifolog files
+ /usr/sbin/fifolog_create -s 511488 /var/log/system.log
+ /usr/sbin/fifolog_create -s 511488 /var/log/filter.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/dhcpd.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/vpn.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/openvpn.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/portalauth.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/ipsec.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/relayd.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/lighttpd.log
+ /usr/sbin/fifolog_create -s 50688 /var/log/ntpd.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 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/slbd.log
+ /usr/sbin/clog -i -s 65535 /var/log/lighttpd.log
+ /usr/sbin/clog -i -s 65535 /var/log/ntpd.log
+ fi
fi
# change permissions on newly created fifolog files.
chmod 0600 /var/log/system.log /var/log/filter.log /var/log/dhcpd.log /var/log/vpn.log /var/log/portalauth.log /var/log/relayd.log
OpenPOWER on IntegriCloud