summaryrefslogtreecommitdiff
path: root/package/shorewall-common/patches/patch-install_sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/shorewall-common/patches/patch-install_sh')
-rw-r--r--package/shorewall-common/patches/patch-install_sh98
1 files changed, 98 insertions, 0 deletions
diff --git a/package/shorewall-common/patches/patch-install_sh b/package/shorewall-common/patches/patch-install_sh
new file mode 100644
index 000000000..715d0130a
--- /dev/null
+++ b/package/shorewall-common/patches/patch-install_sh
@@ -0,0 +1,98 @@
+$Id$
+--- shorewall-common-4.0.5.orig/install.sh 2007-10-19 16:33:06.000000000 +0000
++++ shorewall-common-4.0.5/install.sh 2007-10-23 23:33:47.000000000 +0000
+@@ -183,7 +183,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/
+ #
+ # Determine where to install the firewall script
+ #
+-DEBIAN=
+
+ OWNERSHIP="-o $OWNER -g $GROUP"
+
+@@ -198,16 +197,6 @@ if [ -n "$PREFIX" ]; then
+ else
+ [ -x /usr/share/shorewall-shell/compiler -o -x /usr/share/shorewall-perl/compiler.pl ] || \
+ { echo " ERROR: No Shorewall compiler is installed" >&2; exit 1; }
+- if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
+- DEBIAN=yes
+- elif [ -f /etc/slackware-version ] ; then
+- DEST="/etc/rc.d"
+- INIT="rc.firewall"
+- elif [ -f /etc/arch-release ] ; then
+- DEST="/etc/rc.d"
+- INIT="shorewall"
+- ARCHLINUX=yes
+- fi
+ fi
+
+ #
+@@ -238,14 +227,7 @@ echo "shorewall control program installe
+ #
+ # Install the Firewall Script
+ #
+-if [ -n "$DEBIAN" ]; then
+- install_file_with_backup init.debian.sh /etc/init.d/shorewall 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
+-elif [ -n "$ARCHLINUX" ]; then
+- install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
+-
+-else
+- install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
+-fi
++install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
+
+ echo "Shorewall script installed in ${PREFIX}${DEST}/$INIT"
+
+@@ -273,9 +255,6 @@ if [ ! -f ${PREFIX}/etc/shorewall/shorew
+ fi
+
+
+-if [ -n "$ARCHLINUX" ] ; then
+- sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall/shorewall.conf
+-fi
+ #
+ # Install the zones file
+ #
+@@ -704,43 +683,6 @@ echo "Man Pages Installed"
+ #
+ install_file firewall ${PREFIX}/usr/share/shorewall/firewall 0755
+
+-if [ -z "$PREFIX" -a -n "$first_install" ]; then
+- if [ -n "$DEBIAN" ]; then
+- run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall
+- ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
+- echo "shorewall will start automatically at boot"
+- echo "Set startup=1 in /etc/default/shorewall to enable"
+- touch /var/log/shorewall-init.log
+- qt mywhich perl && perl -p -w -i -e 's/^STARTUP_ENABLED=No/STARTUP_ENABLED=Yes/;s/^IP_FORWARDING=On/IP_FORWARDING=Keep/;s/^SUBSYSLOCK=.*/SUBSYSLOCK=/;' /etc/shorewall/shorewall.conf
+- else
+- if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
+- if insserv /etc/init.d/shorewall ; then
+- echo "shorewall will start automatically at boot"
+- echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
+- else
+- cant_autostart
+- fi
+- elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
+- if chkconfig --add shorewall ; then
+- echo "shorewall will start automatically in run levels as follows:"
+- echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
+- chkconfig --list shorewall
+- else
+- cant_autostart
+- fi
+- elif [ -x /sbin/rc-update ]; then
+- if rc-update add shorewall default; then
+- echo "shorewall will start automatically at boot"
+- echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
+- else
+- cant_autostart
+- fi
+- elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
+- cant_autostart
+- fi
+- fi
+-fi
+-
+ #
+ # Report Success
+ #