1 |
pva 09/01/22 08:44:06 |
2 |
|
3 |
Added: shorewall6-lite.initd |
4 |
Log: |
5 |
Initial import, bug #255437, thank Vieri for all work. |
6 |
(Portage version: 2.2_rc23/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-firewall/shorewall6-lite/files/shorewall6-lite.initd |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/shorewall6-lite/files/shorewall6-lite.initd?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/shorewall6-lite/files/shorewall6-lite.initd?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: shorewall6-lite.initd |
15 |
=================================================================== |
16 |
#!/sbin/runscript |
17 |
# Copyright 1999-2009 Gentoo Foundation |
18 |
# Distributed under the terms of the GNU General Public License v2 |
19 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall6-lite/files/shorewall6-lite.initd,v 1.1 2009/01/22 08:44:06 pva Exp $ |
20 |
|
21 |
opts="start stop restart clear reset refresh" |
22 |
|
23 |
depend() { |
24 |
need net |
25 |
provide firewall |
26 |
after ulogd |
27 |
} |
28 |
|
29 |
start() { |
30 |
ebegin "Starting firewall" |
31 |
/sbin/shorewall6-lite -f start 1>/dev/null |
32 |
eend $? |
33 |
} |
34 |
|
35 |
stop() { |
36 |
ebegin "Stopping firewall" |
37 |
/sbin/shorewall6-lite stop 1>/dev/null |
38 |
eend $? |
39 |
} |
40 |
|
41 |
restart() { |
42 |
# shorewall comes with its own control script that includes a |
43 |
# restart function, so refrain from calling svc_stop/svc_start |
44 |
# here. Note that this comment is required to fix bug 55576; |
45 |
# runscript.sh greps this script... (09 Jul 2004 agriffis) |
46 |
ebegin "Restarting firewall" |
47 |
if [ -f /var/lib/shorewall6-lite/restore ] ; then |
48 |
/sbin/shorewall6-lite restore |
49 |
else |
50 |
/sbin/shorewall6-lite restart 1>/dev/null |
51 |
fi |
52 |
eend $? |
53 |
} |
54 |
|
55 |
clear() { |
56 |
# clear will remove all the rules and bring the system to an unfirewalled |
57 |
# state. (21 Nov 2004 eldad) |
58 |
|
59 |
ebegin "Clearing all firewall rules and setting policy to ACCEPT" |
60 |
/sbin/shorewall6-lite clear |
61 |
eend $? |
62 |
} |
63 |
|
64 |
reset() { |
65 |
# reset the packet and byte counters in the firewall |
66 |
|
67 |
ebegin "Resetting the packet and byte counters in the firewall" |
68 |
/sbin/shorewall6-lite reset |
69 |
eend $? |
70 |
} |
71 |
|
72 |
refresh() { |
73 |
# refresh the rules involving the broadcast addresses of firewall |
74 |
# interfaces, the black list, traffic control rules and |
75 |
# ECN control rules |
76 |
|
77 |
ebegin "Refreshing firewall rules" |
78 |
/sbin/shorewall6-lite refresh |
79 |
eend $? |
80 |
} |