1 |
constanze 13/10/26 18:37:26 |
2 |
|
3 |
Added: shorewall.confd shorewall.initd shorewall.systemd |
4 |
shorewallrc |
5 |
Log: |
6 |
Version bump; Thanks to Thomas D. |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key BB80F419010E3EC3) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 net-firewall/shorewall/files/4.5.21.2/shorewall.confd |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.confd?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.confd?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: shorewall.confd |
17 |
=================================================================== |
18 |
# Global start/restart/stop options |
19 |
# |
20 |
OPTIONS="" |
21 |
|
22 |
# Start options |
23 |
# |
24 |
STARTOPTIONS="" |
25 |
|
26 |
# Stop options |
27 |
# |
28 |
STOPOPTIONS="" |
29 |
|
30 |
# Restart options |
31 |
# |
32 |
RESTARTOPTIONS="" |
33 |
|
34 |
|
35 |
|
36 |
1.1 net-firewall/shorewall/files/4.5.21.2/shorewall.initd |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.initd?rev=1.1&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.initd?rev=1.1&content-type=text/plain |
40 |
|
41 |
Index: shorewall.initd |
42 |
=================================================================== |
43 |
#!/sbin/runscript |
44 |
# Copyright 1999-2013 Gentoo Foundation |
45 |
# Distributed under the terms of the GNU General Public License v2 |
46 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.initd,v 1.1 2013/10/26 18:37:26 constanze Exp $ |
47 |
|
48 |
description='The Shoreline Firewall, more commonly known as "Shorewall", is' |
49 |
description="${description} a high-level tool for configuring Netfilter." |
50 |
|
51 |
extra_commands="check clear" |
52 |
extra_started_commands="refresh reset" |
53 |
|
54 |
description_check="Checks if the configuration will compile or not." |
55 |
|
56 |
description_clear="Clear will remove all rules and chains installed by" |
57 |
description_clear="${description_clear} Shorewall. The firewall is then" |
58 |
description_clear="${description_clear} wide open and unprotected." |
59 |
|
60 |
description_refresh="The mangle table will be refreshed along with the" |
61 |
description_refresh="${description_refresh} blacklist chain (if any)." |
62 |
|
63 |
description_reset="All the packet and byte counters in the firewall are reset." |
64 |
|
65 |
depend() { |
66 |
need net |
67 |
provide firewall |
68 |
after ulogd |
69 |
} |
70 |
|
71 |
status() { |
72 |
local _retval |
73 |
/sbin/shorewall status 1>/dev/null |
74 |
_retval=$? |
75 |
if [ ${_retval} = '0' ]; then |
76 |
einfo 'status: started' |
77 |
mark_service_started "${SVCNAME}" |
78 |
return 0 |
79 |
else |
80 |
einfo 'status: stopped' |
81 |
mark_service_stopped "${SVCNAME}" |
82 |
return 3 |
83 |
fi |
84 |
} |
85 |
|
86 |
start() { |
87 |
ebegin "Starting shorewall" |
88 |
/sbin/shorewall ${OPTIONS} start ${STARTOPTIONS} 1>/dev/null |
89 |
eend $? |
90 |
} |
91 |
|
92 |
stop() { |
93 |
ebegin "Stopping shorewall" |
94 |
/sbin/shorewall ${OPTIONS} stop ${STOPOPTIONS} 1>/dev/null |
95 |
eend $? |
96 |
} |
97 |
|
98 |
restart() { |
99 |
# shorewall comes with its own control script that includes a |
100 |
# restart function, so refrain from calling svc_stop/svc_start |
101 |
# here. Note that this comment is required to fix bug 55576; |
102 |
# runscript.sh greps this script... (09 Jul 2004 agriffis) |
103 |
|
104 |
ebegin "Restarting shorewall" |
105 |
/sbin/shorewall status 1>/dev/null |
106 |
if [ $? != 0 ] ; then |
107 |
svc_start |
108 |
else |
109 |
/sbin/shorewall ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null |
110 |
fi |
111 |
eend $? |
112 |
} |
113 |
|
114 |
clear() { |
115 |
# clear will remove all the rules and bring the system to an unfirewalled |
116 |
# state. (21 Nov 2004 eldad) |
117 |
|
118 |
ebegin "Clearing all shorewall rules and setting policy to ACCEPT" |
119 |
/sbin/shorewall ${OPTIONS} clear 1>/dev/null |
120 |
eend $? |
121 |
} |
122 |
|
123 |
reset() { |
124 |
# reset the packet and byte counters in the firewall |
125 |
|
126 |
ebegin "Resetting the packet and byte counters in shorewall" |
127 |
/sbin/shorewall ${OPTIONS} reset 1>/dev/null |
128 |
eend $? |
129 |
} |
130 |
|
131 |
refresh() { |
132 |
# refresh the rules involving the broadcast addresses of firewall |
133 |
# interfaces, the black list, traffic control rules and |
134 |
# ECN control rules |
135 |
|
136 |
ebegin "Refreshing shorewall rules" |
137 |
/sbin/shorewall ${OPTIONS} refresh 1>/dev/null |
138 |
eend $? |
139 |
} |
140 |
|
141 |
check() { |
142 |
# perform cursory validation of the zones, interfaces, hosts, rules |
143 |
# and policy files. CAUTION: does not parse and validate the generated |
144 |
# iptables commands. |
145 |
|
146 |
ebegin "Checking shorewall configuration" |
147 |
/sbin/shorewall ${OPTIONS} check 1>/dev/null |
148 |
eend $? |
149 |
} |
150 |
|
151 |
|
152 |
|
153 |
1.1 net-firewall/shorewall/files/4.5.21.2/shorewall.systemd |
154 |
|
155 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.systemd?rev=1.1&view=markup |
156 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewall.systemd?rev=1.1&content-type=text/plain |
157 |
|
158 |
Index: shorewall.systemd |
159 |
=================================================================== |
160 |
# |
161 |
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5 |
162 |
# |
163 |
[Unit] |
164 |
Description=Shorewall IPv4 firewall |
165 |
Documentation=man:shorewall(8) http://www.shorewall.net/Documentation_Index.html |
166 |
After=network.target |
167 |
|
168 |
[Service] |
169 |
Type=oneshot |
170 |
RemainAfterExit=yes |
171 |
EnvironmentFile=/etc/conf.d/shorewall |
172 |
ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS |
173 |
ExecStop=/sbin/shorewall $OPTIONS stop $STOPOPTIONS |
174 |
|
175 |
[Install] |
176 |
WantedBy=multi-user.target |
177 |
|
178 |
|
179 |
|
180 |
1.1 net-firewall/shorewall/files/4.5.21.2/shorewallrc |
181 |
|
182 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewallrc?rev=1.1&view=markup |
183 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/shorewall/files/4.5.21.2/shorewallrc?rev=1.1&content-type=text/plain |
184 |
|
185 |
Index: shorewallrc |
186 |
=================================================================== |
187 |
# |
188 |
# Gentoo Shorewall 4.5 rc file |
189 |
# |
190 |
BUILD= #Default is to detect the build system |
191 |
HOST=gentoo #Gentoo GNU Linux |
192 |
PREFIX=@GENTOO_PORTAGE_EPREFIX@/usr #Top-level directory for shared files, libraries, etc. |
193 |
SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. |
194 |
LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. |
195 |
PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory |
196 |
CONFDIR=@GENTOO_PORTAGE_EPREFIX@/etc #Directory where subsystem configurations are installed |
197 |
SBINDIR=@GENTOO_PORTAGE_EPREFIX@/sbin #Directory where system administration programs are installed |
198 |
MANDIR=${PREFIX}/share/man #Directory where manpages are installed. |
199 |
INITDIR=${CONFDIR}/init.d #Directory where SysV init scripts are installed. |
200 |
INITFILE=${PRODUCT} #Name of the product's installed SysV init script |
201 |
INITSOURCE=init.gentoo.sh #Name of the distributed file to be installed as the SysV init script |
202 |
ANNOTATED= #If non-zero, annotated configuration files are installed |
203 |
SYSTEMD=@GENTOO_PORTAGE_EPREFIX@/usr/lib/systemd/system #Directory where .service files are installed (systems running systemd only) |
204 |
SERVICEFILE=gentoo.service #Name of the distributed file to be installed as systemd service file |
205 |
SYSCONFFILE=default.gentoo #Name of the distributed file to be installed in $SYSCONFDIR |
206 |
SYSCONFDIR=${CONFDIR}/conf.d #Directory where SysV init parameter files are installed |
207 |
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR |
208 |
VARLIB=@GENTOO_PORTAGE_EPREFIX@/var/lib #Directory where product variable data is stored. |
209 |
VARDIR=${VARLIB}/${PRODUCT} #Directory where product variable data is stored. |