summaryrefslogtreecommitdiff
path: root/package/shorewall-common/patches/patch-install_sh
blob: b9ed1057414ba0193abf9d9473d170b023084cb1 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
$Id$
--- shorewall-common-4.0.7.orig/install.sh	2007-12-26 22:15:47.000000000 +0100
+++ shorewall-common-4.0.7/install.sh	2009-12-11 23:10:40.000000000 +0100
@@ -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
 #
@@ -683,15 +662,18 @@ fi
 
 cd manpages
 
+run_install -d ${PREFIX}/usr/share/man/man5
+run_install -d ${PREFIX}/usr/share/man/man8
+
 for f in *.5; do
     gzip -c $f > $f.gz
-    run_install -D  -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
+    run_install -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
     echo "Man page $f.gz installed to /usr/share/man/man5/$f.gz"
 done
 
 for f in *.8; do
     gzip -c $f > $f.gz
-    run_install -D  -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
+    run_install -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
     echo "Man page $f.gz installed to /usr/share/man/man8/$f.gz"
 done
 
@@ -704,43 +686,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
 #