diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 90bc88675..3cb3d907e 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -285,7 +285,12 @@ fi if [ -z "$DESTDIR" ]; then if [ -n "$first_install" ]; then if [ -n "$DEBIAN" ]; then - ln -sf ../init.d/shorewall-init /etc/rcS.d/S08shorewall-init + if [ -x /sbin/insserv ]; then + insserv /etc/init.d/shorewall-init + else + ln -sf ../init.d/shorewall-init /etc/rcS.d/S38shorewall-init + fi + echo "Shorewall Init will start automatically at boot" else if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then @@ -319,7 +324,7 @@ else mkdir -p ${DESTDIR}/etc/rcS.d fi - ln -sf ../init.d/shorewall-init ${DESTDIR}/etc/rcS.d/S08shorewall-init + ln -sf ../init.d/shorewall-init ${DESTDIR}/etc/rcS.d/S38shorewall-init echo "Shorewall Init will start automatically at boot" fi fi diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 60bab3718..d741f3a59 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -354,7 +354,13 @@ if [ -z "$DESTDIR" ]; then 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 + + if [ -x /sbin/insserv ]; then + insserv /etc/init.d/shorewall-lite + else + ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite + fi + echo "Shorewall Lite will start automatically at boot" else if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 993f11dd0..56e1ec974 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -867,7 +867,13 @@ fi if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then if [ -n "$DEBIAN" ]; then install_file default.debian /etc/default/shorewall 0644 - ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall + + if [ -x /sbin/insserv ]; then + insserv /etc/init.d/shorewall + else + ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall + fi + echo "shorewall will start automatically at boot" echo "Set startup=1 in /etc/default/shorewall to enable" touch /var/log/shorewall-init.log diff --git a/Shorewall6-lite/install.sh b/Shorewall6-lite/install.sh index 724f287df..39f27d744 100755 --- a/Shorewall6-lite/install.sh +++ b/Shorewall6-lite/install.sh @@ -350,7 +350,13 @@ if [ -z "$DESTDIR" ]; then 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 + + if [ -x /sbin/insserv ]; then + insserv /etc/init.d/shorewall6-lite + else + ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite + fi + echo "Shorewall6 Lite will start automatically at boot" else if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then diff --git a/Shorewall6/install.sh b/Shorewall6/install.sh index 942b9a12d..200c34a51 100755 --- a/Shorewall6/install.sh +++ b/Shorewall6/install.sh @@ -718,7 +718,13 @@ fi if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then if [ -n "$DEBIAN" ]; then run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6 - ln -s ../init.d/shorewall6 /etc/rcS.d/S40shorewall6 + + if [ -x /sbin/insserv ]; then + insserv /etc/init.d/shorewall6 + else + ln -s ../init.d/shorewall6 /etc/rcS.d/S40shorewall6 + fi + echo "shorewall6 will start automatically at boot" echo "Set startup=1 in /etc/default/shorewall6 to enable" touch /var/log/shorewall6-init.log