Rationalize init logs

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-04-10 11:46:50 -07:00
parent 76b9ef7005
commit 4365b83b15
6 changed files with 63 additions and 55 deletions

View File

@ -336,34 +336,37 @@ if [ -z "$PREFIX" ]; then
ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init
fi
if [ -z "$PREFIX" -a -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite
echo "Shorewall Lite will start automatically at boot"
touch /var/log/shorewall-init.log
else
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if insserv /etc/init.d/shorewall-lite ; then
echo "Shorewall Lite will start automatically at boot"
else
if [ -z "$PREFIX" ]; then
touch /var/log/shorewall-lite-init.log
if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite
echo "Shorewall Lite will start automatically at boot"
else
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if insserv /etc/init.d/shorewall-lite ; then
echo "Shorewall Lite will start automatically at boot"
else
cant_autostart
fi
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
if chkconfig --add shorewall-lite ; then
echo "Shorewall Lite will start automatically in run levels as follows:"
chkconfig --list shorewall-lite
else
cant_autostart
fi
elif [ -x /sbin/rc-update ]; then
if rc-update add shorewall-lite default; then
echo "Shorewall Lite will start automatically at boot"
else
cant_autostart
fi
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
cant_autostart
fi
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
if chkconfig --add shorewall-lite ; then
echo "Shorewall Lite will start automatically in run levels as follows:"
chkconfig --list shorewall-lite
else
cant_autostart
fi
elif [ -x /sbin/rc-update ]; then
if rc-update add shorewall-lite default; then
echo "Shorewall Lite will start automatically at boot"
else
cant_autostart
fi
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
cant_autostart
fi
fi
fi

View File

@ -1,4 +1,4 @@
/var/log/shorewall-init.log {
/var/log/shorewall-lite-init.log {
missingok
notifempty
create 0600 root root

View File

@ -264,6 +264,7 @@ fi
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall-lite-init.log' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf

View File

@ -334,34 +334,37 @@ if [ -z "$PREFIX" ]; then
ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init
fi
if [ -z "$PREFIX" -a -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
echo "Shorewall6 Lite will start automatically at boot"
touch /var/log/shorewall-init.log
else
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if insserv /etc/init.d/shorewall6-lite ; then
echo "Shorewall6 Lite will start automatically at boot"
else
if [ -z "$PREFIX" ]; then
touch /var/log/shorewall6-lite-init.log
if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
echo "Shorewall6 Lite will start automatically at boot"
else
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if insserv /etc/init.d/shorewall6-lite ; then
echo "Shorewall6 Lite will start automatically at boot"
else
cant_autostart
fi
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
if chkconfig --add shorewall6-lite ; then
echo "Shorewall6 Lite will start automatically in run levels as follows:"
chkconfig --list shorewall6-lite
else
cant_autostart
fi
elif [ -x /sbin/rc-update ]; then
if rc-update add shorewall6-lite default; then
echo "Shorewall6 Lite will start automatically at boot"
else
cant_autostart
fi
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
cant_autostart
fi
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
if chkconfig --add shorewall6-lite ; then
echo "Shorewall6 Lite will start automatically in run levels as follows:"
chkconfig --list shorewall6-lite
else
cant_autostart
fi
elif [ -x /sbin/rc-update ]; then
if rc-update add shorewall6-lite default; then
echo "Shorewall6 Lite will start automatically at boot"
else
cant_autostart
fi
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
cant_autostart
fi
fi
fi

View File

@ -1,4 +1,4 @@
/var/log/shorewall6-init.log {
/var/log/shorewall6-lite-init.log {
missingok
notifempty
create 0600 root root

View File

@ -256,7 +256,8 @@ fi
#
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
qt mywhich perl && perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall6/configfiles:/usr/share/shorewall6|;' ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall6/configfiles:/usr/share/shorewall6|;' ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall6-lite-init.log' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
if [ ! -f ${PREFIX}/etc/shorewall6/shorewall6.conf ]; then
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/etc/shorewall6/shorewall6.conf