summaryrefslogtreecommitdiff
path: root/package/shorewall-common/patches/patch-install_sh
blob: 715d0130a000e39be28b93e80a002b5d2a080dc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
 #