First stage rework of Shorewall install script

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-05-23 16:02:28 -07:00
parent 54e571fba9
commit 60c751b98f

View File

@ -82,7 +82,7 @@ delete_file() # $1 = file to delete
install_file() # $1 = source $2 = target $3 = mode install_file() # $1 = source $2 = target $3 = mode
{ {
run_install $OWNERSHIP -m $3 $1 ${2} run_install -T $OWNERSHIP -m $3 $1 ${2}
} }
# #
@ -278,13 +278,13 @@ fi
# #
# Install the config file # Install the config file
# #
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall-lite-init.log|;' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall-lite-init.log|;' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/etc/shorewall
if [ -n "$DEBIAN" ] && mywhich perl; then if [ -n "$DEBIAN" ] && mywhich perl; then
# #
@ -302,10 +302,10 @@ fi
# #
# Install the zones file # Install the zones file
# #
run_install $OWNERSHIP -m 0644 configfiles/zones ${PREFIX}/usr/share/shorewall/configfiles/zones run_install $OWNERSHIP -m 0644 configfiles/zones ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/zones ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/zones ]; then
run_install $OWNERSHIP -m 0744 configfiles/zones ${PREFIX}/etc/shorewall/zones run_install $OWNERSHIP -m 0744 configfiles/zones ${PREFIX}/etc/shorewall
echo "Zones file installed as ${PREFIX}/etc/shorewall/zones" echo "Zones file installed as ${PREFIX}/etc/shorewall/zones"
fi fi
@ -335,190 +335,190 @@ echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall/wait4ifup"
# #
# Install the policy file # Install the policy file
# #
run_install $OWNERSHIP -m 0644 configfiles/policy ${PREFIX}/usr/share/shorewall/configfiles/policy install_file configfiles/policy ${PREFIX}/usr/share/shorewall/configfiles/policy 0644
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/policy ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/policy ]; then
run_install $OWNERSHIP -m 0600 configfiles/policy ${PREFIX}/etc/shorewall/policy run_install $OWNERSHIP -m 0600 configfiles/policy ${PREFIX}/etc/shorewall
echo "Policy file installed as ${PREFIX}/etc/shorewall/policy" echo "Policy file installed as ${PREFIX}/etc/shorewall/policy"
fi fi
# #
# Install the interfaces file # Install the interfaces file
# #
run_install $OWNERSHIP -m 0644 configfiles/interfaces ${PREFIX}/usr/share/shorewall/configfiles/interfaces run_install $OWNERSHIP -m 0644 configfiles/interfaces ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/interfaces ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/interfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/interfaces ${PREFIX}/etc/shorewall/interfaces run_install $OWNERSHIP -m 0600 configfiles/interfaces ${PREFIX}/etc/shorewall
echo "Interfaces file installed as ${PREFIX}/etc/shorewall/interfaces" echo "Interfaces file installed as ${PREFIX}/etc/shorewall/interfaces"
fi fi
# #
# Install the hosts file # Install the hosts file
# #
run_install $OWNERSHIP -m 0644 configfiles/hosts ${PREFIX}/usr/share/shorewall/configfiles/hosts run_install $OWNERSHIP -m 0644 configfiles/hosts ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/hosts ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/hosts ]; then
run_install $OWNERSHIP -m 0600 configfiles/hosts ${PREFIX}/etc/shorewall/hosts run_install $OWNERSHIP -m 0600 configfiles/hosts ${PREFIX}/etc/shorewall
echo "Hosts file installed as ${PREFIX}/etc/shorewall/hosts" echo "Hosts file installed as ${PREFIX}/etc/shorewall/hosts"
fi fi
# #
# Install the rules file # Install the rules file
# #
run_install $OWNERSHIP -m 0644 configfiles/rules ${PREFIX}/usr/share/shorewall/configfiles/rules run_install $OWNERSHIP -m 0644 configfiles/rules ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/rules ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/rules ${PREFIX}/etc/shorewall/rules run_install $OWNERSHIP -m 0600 configfiles/rules ${PREFIX}/etc/shorewall
echo "Rules file installed as ${PREFIX}/etc/shorewall/rules" echo "Rules file installed as ${PREFIX}/etc/shorewall/rules"
fi fi
# #
# Install the NAT file # Install the NAT file
# #
run_install $OWNERSHIP -m 0644 configfiles/nat ${PREFIX}/usr/share/shorewall/configfiles/nat run_install $OWNERSHIP -m 0644 configfiles/nat ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/nat ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/nat ]; then
run_install $OWNERSHIP -m 0600 configfiles/nat ${PREFIX}/etc/shorewall/nat run_install $OWNERSHIP -m 0600 configfiles/nat ${PREFIX}/etc/shorewall
echo "NAT file installed as ${PREFIX}/etc/shorewall/nat" echo "NAT file installed as ${PREFIX}/etc/shorewall/nat"
fi fi
# #
# Install the NETMAP file # Install the NETMAP file
# #
run_install $OWNERSHIP -m 0644 configfiles/netmap ${PREFIX}/usr/share/shorewall/configfiles/netmap run_install $OWNERSHIP -m 0644 configfiles/netmap ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/netmap ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/netmap ]; then
run_install $OWNERSHIP -m 0600 configfiles/netmap ${PREFIX}/etc/shorewall/netmap run_install $OWNERSHIP -m 0600 configfiles/netmap ${PREFIX}/etc/shorewall
echo "NETMAP file installed as ${PREFIX}/etc/shorewall/netmap" echo "NETMAP file installed as ${PREFIX}/etc/shorewall/netmap"
fi fi
# #
# Install the Parameters file # Install the Parameters file
# #
run_install $OWNERSHIP -m 0644 configfiles/params ${PREFIX}/usr/share/shorewall/configfiles/params run_install $OWNERSHIP -m 0644 configfiles/params ${PREFIX}/usr/share/shorewall/configfiles
if [ -f ${PREFIX}/etc/shorewall/params ]; then if [ -f ${PREFIX}/etc/shorewall/params ]; then
chmod 0644 ${PREFIX}/etc/shorewall/params chmod 0644 ${PREFIX}/etc/shorewall/params
else else
run_install $OWNERSHIP -m 0644 configfiles/params ${PREFIX}/etc/shorewall/params run_install $OWNERSHIP -m 0644 configfiles/params ${PREFIX}/etc/shorewall
echo "Parameter file installed as ${PREFIX}/etc/shorewall/params" echo "Parameter file installed as ${PREFIX}/etc/shorewall/params"
fi fi
# #
# Install the proxy ARP file # Install the proxy ARP file
# #
run_install $OWNERSHIP -m 0644 configfiles/proxyarp ${PREFIX}/usr/share/shorewall/configfiles/proxyarp run_install $OWNERSHIP -m 0644 configfiles/proxyarp ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/proxyarp ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/proxyarp ]; then
run_install $OWNERSHIP -m 0600 configfiles/proxyarp ${PREFIX}/etc/shorewall/proxyarp run_install $OWNERSHIP -m 0600 configfiles/proxyarp ${PREFIX}/etc/shorewall
echo "Proxy ARP file installed as ${PREFIX}/etc/shorewall/proxyarp" echo "Proxy ARP file installed as ${PREFIX}/etc/shorewall/proxyarp"
fi fi
# #
# Install the Stopped Routing file # Install the Stopped Routing file
# #
run_install $OWNERSHIP -m 0644 configfiles/routestopped ${PREFIX}/usr/share/shorewall/configfiles/routestopped run_install $OWNERSHIP -m 0644 configfiles/routestopped ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/routestopped ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/routestopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/routestopped ${PREFIX}/etc/shorewall/routestopped run_install $OWNERSHIP -m 0600 configfiles/routestopped ${PREFIX}/etc/shorewall
echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall/routestopped" echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall/routestopped"
fi fi
# #
# Install the Mac List file # Install the Mac List file
# #
run_install $OWNERSHIP -m 0644 configfiles/maclist ${PREFIX}/usr/share/shorewall/configfiles/maclist run_install $OWNERSHIP -m 0644 configfiles/maclist ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/maclist ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/maclist ]; then
run_install $OWNERSHIP -m 0600 configfiles/maclist ${PREFIX}/etc/shorewall/maclist run_install $OWNERSHIP -m 0600 configfiles/maclist ${PREFIX}/etc/shorewall
echo "MAC list file installed as ${PREFIX}/etc/shorewall/maclist" echo "MAC list file installed as ${PREFIX}/etc/shorewall/maclist"
fi fi
# #
# Install the Masq file # Install the Masq file
# #
run_install $OWNERSHIP -m 0644 configfiles/masq ${PREFIX}/usr/share/shorewall/configfiles/masq run_install $OWNERSHIP -m 0644 configfiles/masq ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/masq ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/masq ]; then
run_install $OWNERSHIP -m 0600 configfiles/masq ${PREFIX}/etc/shorewall/masq run_install $OWNERSHIP -m 0600 configfiles/masq ${PREFIX}/etc/shorewall
echo "Masquerade file installed as ${PREFIX}/etc/shorewall/masq" echo "Masquerade file installed as ${PREFIX}/etc/shorewall/masq"
fi fi
# #
# Install the Notrack file # Install the Notrack file
# #
run_install $OWNERSHIP -m 0644 configfiles/notrack ${PREFIX}/usr/share/shorewall/configfiles/notrack run_install $OWNERSHIP -m 0644 configfiles/notrack ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/notrack ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/notrack ]; then
run_install $OWNERSHIP -m 0600 configfiles/notrack ${PREFIX}/etc/shorewall/notrack run_install $OWNERSHIP -m 0600 configfiles/notrack ${PREFIX}/etc/shorewall
echo "Notrack file installed as ${PREFIX}/etc/shorewall/notrack" echo "Notrack file installed as ${PREFIX}/etc/shorewall/notrack"
fi fi
# #
# Install the Modules file # Install the Modules file
# #
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall/modules run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall
echo "Modules file installed as ${PREFIX}/usr/share/shorewall/modules" echo "Modules file installed as ${PREFIX}/usr/share/shorewall/modules"
# #
# Install the Module Helpers file # Install the Module Helpers file
# #
run_install $OWNERSHIP -m 0600 helpers ${PREFIX}/usr/share/shorewall/helpers run_install $OWNERSHIP -m 0600 helpers ${PREFIX}/usr/share/shorewall
echo "Helper modules file installed as ${PREFIX}/usr/share/shorewall/helpers" echo "Helper modules file installed as ${PREFIX}/usr/share/shorewall/helpers"
# #
# Install the TC Rules file # Install the TC Rules file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcrules ${PREFIX}/usr/share/shorewall/configfiles/tcrules run_install $OWNERSHIP -m 0644 configfiles/tcrules ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcrules ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcrules ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcrules ${PREFIX}/etc/shorewall/tcrules run_install $OWNERSHIP -m 0600 configfiles/tcrules ${PREFIX}/etc/shorewall
echo "TC Rules file installed as ${PREFIX}/etc/shorewall/tcrules" echo "TC Rules file installed as ${PREFIX}/etc/shorewall/tcrules"
fi fi
# #
# Install the TC Interfaces file # Install the TC Interfaces file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces ${PREFIX}/usr/share/shorewall/configfiles/tcinterfaces run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcinterfaces ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcinterfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcinterfaces ${PREFIX}/etc/shorewall/tcinterfaces run_install $OWNERSHIP -m 0600 configfiles/tcinterfaces ${PREFIX}/etc/shorewall
echo "TC Interfaces file installed as ${PREFIX}/etc/shorewall/tcinterfaces" echo "TC Interfaces file installed as ${PREFIX}/etc/shorewall/tcinterfaces"
fi fi
# #
# Install the TC Priority file # Install the TC Priority file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcpri ${PREFIX}/usr/share/shorewall/configfiles/tcpri run_install $OWNERSHIP -m 0644 configfiles/tcpri ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcpri ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcpri ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcpri ${PREFIX}/etc/shorewall/tcpri run_install $OWNERSHIP -m 0600 configfiles/tcpri ${PREFIX}/etc/shorewall
echo "TC Priority file installed as ${PREFIX}/etc/shorewall/tcpri" echo "TC Priority file installed as ${PREFIX}/etc/shorewall/tcpri"
fi fi
# #
# Install the TOS file # Install the TOS file
# #
run_install $OWNERSHIP -m 0644 configfiles/tos ${PREFIX}/usr/share/shorewall/configfiles/tos run_install $OWNERSHIP -m 0644 configfiles/tos ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tos ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tos ]; then
run_install $OWNERSHIP -m 0600 configfiles/tos ${PREFIX}/etc/shorewall/tos run_install $OWNERSHIP -m 0600 configfiles/tos ${PREFIX}/etc/shorewall
echo "TOS file installed as ${PREFIX}/etc/shorewall/tos" echo "TOS file installed as ${PREFIX}/etc/shorewall/tos"
fi fi
# #
# Install the Tunnels file # Install the Tunnels file
# #
run_install $OWNERSHIP -m 0644 configfiles/tunnels ${PREFIX}/usr/share/shorewall/configfiles/tunnels run_install $OWNERSHIP -m 0644 configfiles/tunnels ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tunnels ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tunnels ]; then
run_install $OWNERSHIP -m 0600 configfiles/tunnels ${PREFIX}/etc/shorewall/tunnels run_install $OWNERSHIP -m 0600 configfiles/tunnels ${PREFIX}/etc/shorewall
echo "Tunnels file installed as ${PREFIX}/etc/shorewall/tunnels" echo "Tunnels file installed as ${PREFIX}/etc/shorewall/tunnels"
fi fi
# #
# Install the blacklist file # Install the blacklist file
# #
run_install $OWNERSHIP -m 0644 configfiles/blacklist ${PREFIX}/usr/share/shorewall/configfiles/blacklist run_install $OWNERSHIP -m 0644 configfiles/blacklist ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/blacklist ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/blacklist ]; then
run_install $OWNERSHIP -m 0600 configfiles/blacklist ${PREFIX}/etc/shorewall/blacklist run_install $OWNERSHIP -m 0600 configfiles/blacklist ${PREFIX}/etc/shorewall
echo "Blacklist file installed as ${PREFIX}/etc/shorewall/blacklist" echo "Blacklist file installed as ${PREFIX}/etc/shorewall/blacklist"
fi fi
# #
# Install the findgw file # Install the findgw file
# #
run_install $OWNERSHIP -m 0644 configfiles/findgw ${PREFIX}/usr/share/shorewall/configfiles/findgw run_install $OWNERSHIP -m 0644 configfiles/findgw ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/findgw ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/findgw ]; then
run_install $OWNERSHIP -m 0600 configfiles/findgw ${PREFIX}/etc/shorewall/findgw run_install $OWNERSHIP -m 0600 configfiles/findgw ${PREFIX}/etc/shorewall
echo "Find GW file installed as ${PREFIX}/etc/shorewall/findgw" echo "Find GW file installed as ${PREFIX}/etc/shorewall/findgw"
fi fi
# #
@ -543,50 +543,50 @@ delete_file ${PREFIX}/usr/share/shorewall/xmodules
# #
# Install the Providers file # Install the Providers file
# #
run_install $OWNERSHIP -m 0644 configfiles/providers ${PREFIX}/usr/share/shorewall/configfiles/providers run_install $OWNERSHIP -m 0644 configfiles/providers ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/providers ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/providers ]; then
run_install $OWNERSHIP -m 0600 configfiles/providers ${PREFIX}/etc/shorewall/providers run_install $OWNERSHIP -m 0600 configfiles/providers ${PREFIX}/etc/shorewall
echo "Providers file installed as ${PREFIX}/etc/shorewall/providers" echo "Providers file installed as ${PREFIX}/etc/shorewall/providers"
fi fi
# #
# Install the Route Rules file # Install the Route Rules file
# #
run_install $OWNERSHIP -m 0644 configfiles/route_rules ${PREFIX}/usr/share/shorewall/configfiles/route_rules run_install $OWNERSHIP -m 0644 configfiles/route_rules ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/route_rules ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/route_rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/route_rules ${PREFIX}/etc/shorewall/route_rules run_install $OWNERSHIP -m 0600 configfiles/route_rules ${PREFIX}/etc/shorewall
echo "Routing rules file installed as ${PREFIX}/etc/shorewall/route_rules" echo "Routing rules file installed as ${PREFIX}/etc/shorewall/route_rules"
fi fi
# #
# Install the tcclasses file # Install the tcclasses file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcclasses ${PREFIX}/usr/share/shorewall/configfiles/tcclasses run_install $OWNERSHIP -m 0644 configfiles/tcclasses ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcclasses ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcclasses ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclasses ${PREFIX}/etc/shorewall/tcclasses run_install $OWNERSHIP -m 0600 configfiles/tcclasses ${PREFIX}/etc/shorewall
echo "TC Classes file installed as ${PREFIX}/etc/shorewall/tcclasses" echo "TC Classes file installed as ${PREFIX}/etc/shorewall/tcclasses"
fi fi
# #
# Install the tcdevices file # Install the tcdevices file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcdevices ${PREFIX}/usr/share/shorewall/configfiles/tcdevices run_install $OWNERSHIP -m 0644 configfiles/tcdevices ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcdevices ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcdevices ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcdevices ${PREFIX}/etc/shorewall/tcdevices run_install $OWNERSHIP -m 0600 configfiles/tcdevices ${PREFIX}/etc/shorewall
echo "TC Devices file installed as ${PREFIX}/etc/shorewall/tcdevices" echo "TC Devices file installed as ${PREFIX}/etc/shorewall/tcdevices"
fi fi
# #
# Install the tcfilters file # Install the tcfilters file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcfilters ${PREFIX}/usr/share/shorewall/configfiles/tcfilters run_install $OWNERSHIP -m 0644 configfiles/tcfilters ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcfilters ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcfilters ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcfilters ${PREFIX}/etc/shorewall/tcfilters run_install $OWNERSHIP -m 0600 configfiles/tcfilters ${PREFIX}/etc/shorewall
echo "TC Filters file installed as ${PREFIX}/etc/shorewall/tcfilters" echo "TC Filters file installed as ${PREFIX}/etc/shorewall/tcfilters"
fi fi
@ -598,136 +598,136 @@ echo "Default config path file installed as ${PREFIX}/usr/share/shorewall/config
# #
# Install the init file # Install the init file
# #
run_install $OWNERSHIP -m 0644 configfiles/init ${PREFIX}/usr/share/shorewall/configfiles/init run_install $OWNERSHIP -m 0644 configfiles/init ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/init ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/init ]; then
run_install $OWNERSHIP -m 0600 configfiles/init ${PREFIX}/etc/shorewall/init run_install $OWNERSHIP -m 0600 configfiles/init ${PREFIX}/etc/shorewall
echo "Init file installed as ${PREFIX}/etc/shorewall/init" echo "Init file installed as ${PREFIX}/etc/shorewall/init"
fi fi
# #
# Install the initdone file # Install the initdone file
# #
run_install $OWNERSHIP -m 0644 configfiles/initdone ${PREFIX}/usr/share/shorewall/configfiles/initdone run_install $OWNERSHIP -m 0644 configfiles/initdone ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/initdone ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/initdone ]; then
run_install $OWNERSHIP -m 0600 configfiles/initdone ${PREFIX}/etc/shorewall/initdone run_install $OWNERSHIP -m 0600 configfiles/initdone ${PREFIX}/etc/shorewall
echo "Initdone file installed as ${PREFIX}/etc/shorewall/initdone" echo "Initdone file installed as ${PREFIX}/etc/shorewall/initdone"
fi fi
# #
# Install the start file # Install the start file
# #
run_install $OWNERSHIP -m 0644 configfiles/start ${PREFIX}/usr/share/shorewall/configfiles/start run_install $OWNERSHIP -m 0644 configfiles/start ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/start ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/start ]; then
run_install $OWNERSHIP -m 0600 configfiles/start ${PREFIX}/etc/shorewall/start run_install $OWNERSHIP -m 0600 configfiles/start ${PREFIX}/etc/shorewall
echo "Start file installed as ${PREFIX}/etc/shorewall/start" echo "Start file installed as ${PREFIX}/etc/shorewall/start"
fi fi
# #
# Install the stop file # Install the stop file
# #
run_install $OWNERSHIP -m 0644 configfiles/stop ${PREFIX}/usr/share/shorewall/configfiles/stop run_install $OWNERSHIP -m 0644 configfiles/stop ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/stop ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/stop ]; then
run_install $OWNERSHIP -m 0600 configfiles/stop ${PREFIX}/etc/shorewall/stop run_install $OWNERSHIP -m 0600 configfiles/stop ${PREFIX}/etc/shorewall
echo "Stop file installed as ${PREFIX}/etc/shorewall/stop" echo "Stop file installed as ${PREFIX}/etc/shorewall/stop"
fi fi
# #
# Install the stopped file # Install the stopped file
# #
run_install $OWNERSHIP -m 0644 configfiles/stopped ${PREFIX}/usr/share/shorewall/configfiles/stopped run_install $OWNERSHIP -m 0644 configfiles/stopped ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/stopped ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/stopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/stopped ${PREFIX}/etc/shorewall/stopped run_install $OWNERSHIP -m 0600 configfiles/stopped ${PREFIX}/etc/shorewall
echo "Stopped file installed as ${PREFIX}/etc/shorewall/stopped" echo "Stopped file installed as ${PREFIX}/etc/shorewall/stopped"
fi fi
# #
# Install the ECN file # Install the ECN file
# #
run_install $OWNERSHIP -m 0644 configfiles/ecn ${PREFIX}/usr/share/shorewall/configfiles/ecn run_install $OWNERSHIP -m 0644 configfiles/ecn ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/ecn ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/ecn ]; then
run_install $OWNERSHIP -m 0600 configfiles/ecn ${PREFIX}/etc/shorewall/ecn run_install $OWNERSHIP -m 0600 configfiles/ecn ${PREFIX}/etc/shorewall
echo "ECN file installed as ${PREFIX}/etc/shorewall/ecn" echo "ECN file installed as ${PREFIX}/etc/shorewall/ecn"
fi fi
# #
# Install the Accounting file # Install the Accounting file
# #
run_install $OWNERSHIP -m 0644 configfiles/accounting ${PREFIX}/usr/share/shorewall/configfiles/accounting run_install $OWNERSHIP -m 0644 configfiles/accounting ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/accounting ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/accounting ]; then
run_install $OWNERSHIP -m 0600 configfiles/accounting ${PREFIX}/etc/shorewall/accounting run_install $OWNERSHIP -m 0600 configfiles/accounting ${PREFIX}/etc/shorewall
echo "Accounting file installed as ${PREFIX}/etc/shorewall/accounting" echo "Accounting file installed as ${PREFIX}/etc/shorewall/accounting"
fi fi
# #
# Install the private library file # Install the private library file
# #
run_install $OWNERSHIP -m 0644 configfiles/lib.private ${PREFIX}/usr/share/shorewall/configfiles/lib.private run_install $OWNERSHIP -m 0644 configfiles/lib.private ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/lib.private ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/lib.private ]; then
run_install $OWNERSHIP -m 0600 configfiles/lib.private ${PREFIX}/etc/shorewall/lib.private run_install $OWNERSHIP -m 0600 configfiles/lib.private ${PREFIX}/etc/shorewall
echo "Private library file installed as ${PREFIX}/etc/shorewall/lib.private" echo "Private library file installed as ${PREFIX}/etc/shorewall/lib.private"
fi fi
# #
# Install the Started file # Install the Started file
# #
run_install $OWNERSHIP -m 0644 configfiles/started ${PREFIX}/usr/share/shorewall/configfiles/started run_install $OWNERSHIP -m 0644 configfiles/started ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/started ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/started ]; then
run_install $OWNERSHIP -m 0600 configfiles/started ${PREFIX}/etc/shorewall/started run_install $OWNERSHIP -m 0600 configfiles/started ${PREFIX}/etc/shorewall
echo "Started file installed as ${PREFIX}/etc/shorewall/started" echo "Started file installed as ${PREFIX}/etc/shorewall/started"
fi fi
# #
# Install the Restored file # Install the Restored file
# #
run_install $OWNERSHIP -m 0644 configfiles/restored ${PREFIX}/usr/share/shorewall/configfiles/restored run_install $OWNERSHIP -m 0644 configfiles/restored ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/restored ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/restored ]; then
run_install $OWNERSHIP -m 0600 configfiles/restored ${PREFIX}/etc/shorewall/restored run_install $OWNERSHIP -m 0600 configfiles/restored ${PREFIX}/etc/shorewall
echo "Restored file installed as ${PREFIX}/etc/shorewall/restored" echo "Restored file installed as ${PREFIX}/etc/shorewall/restored"
fi fi
# #
# Install the Clear file # Install the Clear file
# #
run_install $OWNERSHIP -m 0644 configfiles/clear ${PREFIX}/usr/share/shorewall/configfiles/clear run_install $OWNERSHIP -m 0644 configfiles/clear ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/clear ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/clear ]; then
run_install $OWNERSHIP -m 0600 configfiles/clear ${PREFIX}/etc/shorewall/clear run_install $OWNERSHIP -m 0600 configfiles/clear ${PREFIX}/etc/shorewall
echo "Clear file installed as ${PREFIX}/etc/shorewall/clear" echo "Clear file installed as ${PREFIX}/etc/shorewall/clear"
fi fi
# #
# Install the Isusable file # Install the Isusable file
# #
run_install $OWNERSHIP -m 0644 configfiles/isusable ${PREFIX}/usr/share/shorewall/configfiles/isusable run_install $OWNERSHIP -m 0644 configfiles/isusable ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/isusable ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/isusable ]; then
run_install $OWNERSHIP -m 0600 configfiles/isusable ${PREFIX}/etc/shorewall/isusable run_install $OWNERSHIP -m 0600 configfiles/isusable ${PREFIX}/etc/shorewall
echo "Isusable file installed as ${PREFIX}/etc/shorewall/isusable" echo "Isusable file installed as ${PREFIX}/etc/shorewall/isusable"
fi fi
# #
# Install the Refresh file # Install the Refresh file
# #
run_install $OWNERSHIP -m 0644 configfiles/refresh ${PREFIX}/usr/share/shorewall/configfiles/refresh run_install $OWNERSHIP -m 0644 configfiles/refresh ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/refresh ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/refresh ]; then
run_install $OWNERSHIP -m 0600 configfiles/refresh ${PREFIX}/etc/shorewall/refresh run_install $OWNERSHIP -m 0600 configfiles/refresh ${PREFIX}/etc/shorewall
echo "Refresh file installed as ${PREFIX}/etc/shorewall/refresh" echo "Refresh file installed as ${PREFIX}/etc/shorewall/refresh"
fi fi
# #
# Install the Refreshed file # Install the Refreshed file
# #
run_install $OWNERSHIP -m 0644 configfiles/refreshed ${PREFIX}/usr/share/shorewall/configfiles/refreshed run_install $OWNERSHIP -m 0644 configfiles/refreshed ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/refreshed ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/refreshed ]; then
run_install $OWNERSHIP -m 0600 configfiles/refreshed ${PREFIX}/etc/shorewall/refreshed run_install $OWNERSHIP -m 0600 configfiles/refreshed ${PREFIX}/etc/shorewall
echo "Refreshed file installed as ${PREFIX}/etc/shorewall/refreshed" echo "Refreshed file installed as ${PREFIX}/etc/shorewall/refreshed"
fi fi
# #
# Install the Tcclear file # Install the Tcclear file
# #
run_install $OWNERSHIP -m 0644 configfiles/tcclear ${PREFIX}/usr/share/shorewall/configfiles/tcclear run_install $OWNERSHIP -m 0644 configfiles/tcclear ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcclear ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcclear ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclear ${PREFIX}/etc/shorewall/tcclear run_install $OWNERSHIP -m 0600 configfiles/tcclear ${PREFIX}/etc/shorewall
echo "Tcclear file installed as ${PREFIX}/etc/shorewall/tcclear" echo "Tcclear file installed as ${PREFIX}/etc/shorewall/tcclear"
fi fi
# #
@ -739,20 +739,20 @@ echo "Standard actions file installed as ${PREFIX}/usr/shared/shorewall/actions.
# #
# Install the Actions file # Install the Actions file
# #
run_install $OWNERSHIP -m 0644 configfiles/actions ${PREFIX}/usr/share/shorewall/configfiles/actions run_install $OWNERSHIP -m 0644 configfiles/actions ${PREFIX}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/actions ]; then if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/actions ]; then
run_install $OWNERSHIP -m 0644 configfiles/actions ${PREFIX}/etc/shorewall/actions run_install $OWNERSHIP -m 0644 configfiles/actions ${PREFIX}/etc/shorewall
echo "Actions file installed as ${PREFIX}/etc/shorewall/actions" echo "Actions file installed as ${PREFIX}/etc/shorewall/actions"
fi fi
# #
# Install the Makefiles # Install the Makefiles
# #
run_install $OWNERSHIP -m 0644 Makefile-lite ${PREFIX}/usr/share/shorewall/configfiles/Makefile install-file Makefile-lite ${PREFIX}/usr/share/shorewall/configfiles/Makefile 0644
if [ -z "$SPARSE" ]; then if [ -z "$SPARSE" ]; then
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall/Makefile run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall
echo "Makefile installed as ${PREFIX}/etc/shorewall/Makefile" echo "Makefile installed as ${PREFIX}/etc/shorewall/Makefile"
fi fi
# #
@ -834,28 +834,32 @@ fi
# Install the Man Pages # Install the Man Pages
# #
cd manpages if [ -d manpages ]; then
[ -n "$INSTALLD" ] || mkdir -p ${PREFIX}${MANDIR}/man5/ ${PREFIX}${MANDIR}/man8/ cd manpages
for f in *.5; do [ -n "$INSTALLD" ] || mkdir -p ${PREFIX}${MANDIR}/man5/ ${PREFIX}${MANDIR}/man8/
gzip -c $f > $f.gz
run_install $INSTALLD -m 0644 $f.gz ${PREFIX}${MANDIR}/man5/$f.gz
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man5/$f.gz"
done
for f in *.8; do for f in *.5; do
gzip -c $f > $f.gz gzip -c $f > $f.gz
run_install $INSTALLD -m 0644 $f.gz ${PREFIX}${MANDIR}/man8/$f.gz run_install $INSTALLD -m 0644 $f.gz ${PREFIX}${MANDIR}/man5/$f.gz
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man8/$f.gz" echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man5/$f.gz"
done done
cd .. for f in *.8; do
gzip -c $f > $f.gz
run_install $INSTALLD -m 0644 $f.gz ${PREFIX}${MANDIR}/man8/$f.gz
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man8/$f.gz"
done
echo "Man Pages Installed" cd ..
echo "Man Pages Installed"
fi
if [ -d ${PREFIX}/etc/logrotate.d ]; then if [ -d ${PREFIX}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d
echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall" echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall"
fi fi
@ -866,7 +870,7 @@ fi
if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
if [ -n "$DEBIAN" ]; then if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall install_file default.debian /etc/default/shorewall 0644
ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
echo "shorewall will start automatically at boot" echo "shorewall will start automatically at boot"
echo "Set startup=1 in /etc/default/shorewall to enable" echo "Set startup=1 in /etc/default/shorewall to enable"