mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-24 23:28:59 +01:00
Make install.sh install /etc/default/shorewall on Debian if it doesn't exist
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1584 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
d2a9e5b8e0
commit
c973603ddd
@ -539,50 +539,53 @@ fi
|
|||||||
#
|
#
|
||||||
install_file_with_backup firewall ${PREFIX}/usr/share/shorewall/firewall 0544
|
install_file_with_backup firewall ${PREFIX}/usr/share/shorewall/firewall 0544
|
||||||
|
|
||||||
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
if [ -z "$PREFIX" ]; then
|
||||||
if [ -n "$DEBIAN" ]; then
|
if -n "$first_install" ]; then
|
||||||
run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall
|
if [ -n "$DEBIAN" ]; then
|
||||||
ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
|
run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall
|
||||||
echo
|
ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
|
||||||
echo "shorewall will start automatically at boot"
|
echo
|
||||||
echo "Set startup=1 in /etc/default/shorewall to enable"
|
echo "shorewall will start automatically at boot"
|
||||||
else
|
echo "Set startup=1 in /etc/default/shorewall to enable"
|
||||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
else
|
||||||
if insserv /etc/init.d/shorewall ; then
|
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||||
echo
|
if insserv /etc/init.d/shorewall ; then
|
||||||
echo "shorewall will start automatically at boot"
|
echo
|
||||||
echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
|
echo "shorewall will start automatically at boot"
|
||||||
else
|
echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
|
||||||
|
else
|
||||||
|
cant_autostart
|
||||||
|
fi
|
||||||
|
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
|
||||||
|
if chkconfig --add shorewall ; then
|
||||||
|
echo
|
||||||
|
echo "shorewall will start automatically in run levels as follows:"
|
||||||
|
echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
|
||||||
|
chkconfig --list shorewall
|
||||||
|
else
|
||||||
|
cant_autostart
|
||||||
|
fi
|
||||||
|
elif [ -x /sbin/rc-update ]; then
|
||||||
|
if rc-update add shorewall default; then
|
||||||
|
echo
|
||||||
|
echo "shorewall will start automatically at boot"
|
||||||
|
echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
|
||||||
|
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 ; then
|
|
||||||
echo
|
|
||||||
echo "shorewall will start automatically in run levels as follows:"
|
|
||||||
echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
|
|
||||||
chkconfig --list shorewall
|
|
||||||
else
|
|
||||||
cant_autostart
|
|
||||||
fi
|
|
||||||
elif [ -x /sbin/rc-update ]; then
|
|
||||||
if rc-update add shorewall default; then
|
|
||||||
echo
|
|
||||||
echo "shorewall will start automatically at boot"
|
|
||||||
echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
|
|
||||||
else
|
|
||||||
cant_autostart
|
|
||||||
fi
|
|
||||||
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
|
|
||||||
cant_autostart
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo \
|
echo \
|
||||||
"########################################################################
|
"########################################################################
|
||||||
# REMOVE THIS FILE AFTER YOU HAVE CONFIGURED SHOREWALL #
|
# REMOVE THIS FILE AFTER YOU HAVE CONFIGURED SHOREWALL #
|
||||||
########################################################################" > /etc/shorewall/startup_disabled
|
########################################################################" > /etc/shorewall/startup_disabled
|
||||||
|
fi
|
||||||
|
elif [ -n "$DEBIAN" -a ! -f /etc/default/shorewall ]; then
|
||||||
|
run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Report Success
|
# Report Success
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user