From c973603ddd3effa28ae4fc0fadec88f6faea6ef0 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 27 Aug 2004 16:19:08 +0000 Subject: [PATCH] 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 --- STABLE2/install.sh | 81 ++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/STABLE2/install.sh b/STABLE2/install.sh index 4658c85ef..f530acdce 100755 --- a/STABLE2/install.sh +++ b/STABLE2/install.sh @@ -539,50 +539,53 @@ fi # install_file_with_backup firewall ${PREFIX}/usr/share/shorewall/firewall 0544 -if [ -z "$PREFIX" -a -n "$first_install" ]; then - if [ -n "$DEBIAN" ]; then - run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall - ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall - echo - echo "shorewall will start automatically at boot" - echo "Set startup=1 in /etc/default/shorewall to enable" - else - if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then - if insserv /etc/init.d/shorewall ; then - echo - echo "shorewall will start automatically at boot" - echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable" - else +if [ -z "$PREFIX" ]; then + if -n "$first_install" ]; then + if [ -n "$DEBIAN" ]; then + run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall + ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall + echo + echo "shorewall will start automatically at boot" + echo "Set startup=1 in /etc/default/shorewall to enable" + else + if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then + if insserv /etc/init.d/shorewall ; 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 [ -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 - 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 # ########################################################################" > /etc/shorewall/startup_disabled - fi -fi - + 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 # # Report Success #