forked from extern/shorewall_code
Rationalize init logs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
76b9ef7005
commit
4365b83b15
@ -336,34 +336,37 @@ if [ -z "$PREFIX" ]; then
|
|||||||
ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init
|
ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
if [ -z "$PREFIX" ]; then
|
||||||
if [ -n "$DEBIAN" ]; then
|
touch /var/log/shorewall-lite-init.log
|
||||||
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
|
|
||||||
ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite
|
if [ -n "$first_install" ]; then
|
||||||
echo "Shorewall Lite will start automatically at boot"
|
if [ -n "$DEBIAN" ]; then
|
||||||
touch /var/log/shorewall-init.log
|
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
|
||||||
else
|
ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite
|
||||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
echo "Shorewall Lite will start automatically at boot"
|
||||||
if insserv /etc/init.d/shorewall-lite ; then
|
else
|
||||||
echo "Shorewall Lite will start automatically at boot"
|
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||||
else
|
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
|
cant_autostart
|
||||||
fi
|
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
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/var/log/shorewall-init.log {
|
/var/log/shorewall-lite-init.log {
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
create 0600 root root
|
create 0600 root root
|
||||||
|
@ -264,6 +264,7 @@ fi
|
|||||||
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
|
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|^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
|
if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
|
||||||
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf
|
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf
|
||||||
|
@ -334,34 +334,37 @@ if [ -z "$PREFIX" ]; then
|
|||||||
ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init
|
ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
if [ -z "$PREFIX" ]; then
|
||||||
if [ -n "$DEBIAN" ]; then
|
touch /var/log/shorewall6-lite-init.log
|
||||||
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
|
|
||||||
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
|
if [ -n "$first_install" ]; then
|
||||||
echo "Shorewall6 Lite will start automatically at boot"
|
if [ -n "$DEBIAN" ]; then
|
||||||
touch /var/log/shorewall-init.log
|
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
|
||||||
else
|
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
|
||||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
echo "Shorewall6 Lite will start automatically at boot"
|
||||||
if insserv /etc/init.d/shorewall6-lite ; then
|
else
|
||||||
echo "Shorewall6 Lite will start automatically at boot"
|
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||||
else
|
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
|
cant_autostart
|
||||||
fi
|
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
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/var/log/shorewall6-init.log {
|
/var/log/shorewall6-lite-init.log {
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
create 0600 root root
|
create 0600 root root
|
||||||
|
@ -256,7 +256,8 @@ fi
|
|||||||
#
|
#
|
||||||
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
|
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
|
if [ ! -f ${PREFIX}/etc/shorewall6/shorewall6.conf ]; then
|
||||||
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/etc/shorewall6/shorewall6.conf
|
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/etc/shorewall6/shorewall6.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user