Gentoo Archives: gentoo-commits

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