File: shorecap

package info (click to toggle)
shorewall-lite 5.2.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 392 kB
  • sloc: sh: 1,171; xml: 262; perl: 168; makefile: 29
file content (73 lines) | stat: -rwxr-xr-x 2,439 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
#     Shorewall Lite Packet Filtering Firewall Capabilities Detector
#
#     (c) 2006,2007,2008,2009,2010,2014 - Tom Eastep (teastep@shorewall.net)
#
#	This file should be placed in /sbin/shorewall.
#
#	Shorewall documentation is available at http://shorewall.sourceforge.net
#
#       This program is part of Shorewall.
#
#	This program is free software; you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by the
#       Free Software Foundation, either version 2 of the license or, at your
#       option, any later version.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#   This program may be used to create a /etc/shorewall/capabilities file for
#   use in compiling Shorewall firewalls on another system.
#
#   On the target system (the system where the firewall program is to run):
#
#       [ IPTABLES=<iptables binary> ] [ MODULESDIR=<kernel modules directory> ] shorecap > capabilities
#
#    Now move the capabilities file to the compilation system. The file must
#    be placed in a directory on the CONFIG_PATH to be used when compiling firewalls
#    for the target system.
#
#    Default values for the two variables are:
#
#        IPTABLES - iptables
#        MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter
#
#    Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is
#    used during firewall compilation, then the generated firewall program will likewise not
#    require Shorewall to be installed.


PRODUCT=shorewall-lite

#
# This is modified by the installer when ${SHAREDIR} != /usr/share
#
. /usr/share/shorewall/shorewallrc

g_basedir=${SHAREDIR}/shorewall

. ${SHAREDIR}/shorewall/lib.cli

setup_product_environment

. ${SHAREDIR}/shorewall-lite/configpath

[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin

SHOREWALL_VERSION=$(cat /usr/share/shorewall-lite/version)

[ -n "$IPTABLES" ] || IPTABLES=$(mywhich iptables)

g_tool=$IPTABLES

VERBOSITY=0
load_kernel_modules No
determine_capabilities
report_capabilities1