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
{
run_install $OWNERSHIP -m $3 $1 ${2}
run_install -T $OWNERSHIP -m $3 $1 ${2}
}
#
@ -278,13 +278,13 @@ fi
#
# 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|^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
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
#
@ -302,10 +302,10 @@ fi
#
# 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
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"
fi
@ -335,190 +335,190 @@ echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall/wait4ifup"
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
chmod 0644 ${PREFIX}/etc/shorewall/params
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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"
#
# 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"
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
@ -543,50 +543,50 @@ delete_file ${PREFIX}/usr/share/shorewall/xmodules
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
@ -598,136 +598,136 @@ echo "Default config path file installed as ${PREFIX}/usr/share/shorewall/config
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
# 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
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"
fi
#
@ -739,20 +739,20 @@ echo "Standard actions file installed as ${PREFIX}/usr/shared/shorewall/actions.
#
# 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
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"
fi
#
# 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
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"
fi
#
@ -834,28 +834,32 @@ fi
# 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
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
[ -n "$INSTALLD" ] || mkdir -p ${PREFIX}${MANDIR}/man5/ ${PREFIX}${MANDIR}/man8/
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
for f in *.5; do
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
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
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"
fi
@ -866,7 +870,7 @@ fi
if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; 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
echo "shorewall will start automatically at boot"
echo "Set startup=1 in /etc/default/shorewall to enable"