Rename PREFIX->DESTDIR

If DESTDIR is not supplied, look for PREFIX

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-06-01 06:42:11 -07:00
parent 0553f232b5
commit fe55fa0f31
5 changed files with 623 additions and 613 deletions

View File

@ -86,6 +86,8 @@ install_file() # $1 = source $2 = target $3 = mode
run_install $T $OWNERSHIP -m $3 $1 ${2}
}
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
#
# Parse the run line
#
@ -145,13 +147,13 @@ esac
OWNERSHIP="-o $OWNER -g $GROUP"
if [ -n "$PREFIX" ]; then
if [ -n "$DESTDIR" ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
elif [ -f /etc/debian_version ]; then
DEBIAN=yes
elif [ -f /etc/SuSE-release ]; then
@ -187,7 +189,7 @@ echo "Installing Shorewall Init Version $VERSION"
#
# Check for /usr/share/shorewall-init/version
#
if [ -f ${PREFIX}/usr/share/shorewall-init/version ]; then
if [ -f ${DESTDIR}/usr/share/shorewall-init/version ]; then
first_install=""
else
first_install="Yes"
@ -197,64 +199,64 @@ fi
# Install the Init Script
#
if [ -n "$DEBIAN" ]; then
install_file init.debian.sh ${PREFIX}/etc/init.d/shorewall-init 0544
install_file init.debian.sh ${DESTDIR}/etc/init.d/shorewall-init 0544
#elif [ -n "$ARCHLINUX" ]; then
# install_file init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544
# install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544
else
install_file init.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544
fi
echo "Shorewall Init script installed in ${PREFIX}${DEST}/$INIT"
echo "Shorewall Init script installed in ${DESTDIR}${DEST}/$INIT"
#
# Create /usr/share/shorewall-init if needed
#
mkdir -p ${PREFIX}/usr/share/shorewall-init
chmod 755 ${PREFIX}/usr/share/shorewall-init
mkdir -p ${DESTDIR}/usr/share/shorewall-init
chmod 755 ${DESTDIR}/usr/share/shorewall-init
#
# Create the version file
#
echo "$VERSION" > ${PREFIX}/usr/share/shorewall-init/version
chmod 644 ${PREFIX}/usr/share/shorewall-init/version
echo "$VERSION" > ${DESTDIR}/usr/share/shorewall-init/version
chmod 644 ${DESTDIR}/usr/share/shorewall-init/version
#
# Remove and create the symbolic link to the init script
#
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
rm -f /usr/share/shorewall-init/init
ln -s ${DEST}/${INIT} /usr/share/shorewall-init/init
fi
if [ -n "$DEBIAN" ]; then
if [ -n "${PREFIX}" ]; then
mkdir -p ${PREFIX}/etc/network/if-up.d/
mkdir -p ${PREFIX}/etc/network/if-post-down.d/
if [ -n "${DESTDIR}" ]; then
mkdir -p ${DESTDIR}/etc/network/if-up.d/
mkdir -p ${DESTDIR}/etc/network/if-post-down.d/
fi
if [ ! -f ${PREFIX}/etc/default/shorewall-init ]; then
if [ -n "${PREFIX}" ]; then
mkdir ${PREFIX}/etc/default
if [ ! -f ${DESTDIR}/etc/default/shorewall-init ]; then
if [ -n "${DESTDIR}" ]; then
mkdir ${DESTDIR}/etc/default
fi
install_file sysconfig ${PREFIX}/etc/default/shorewall-init 0644
install_file sysconfig ${DESTDIR}/etc/default/shorewall-init 0644
fi
else
if [ -n "$PREFIX" ]; then
mkdir -p ${PREFIX}/etc/sysconfig
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}/etc/sysconfig
if [ -z "$RPM" ]; then
if [ -n "$SUSE" ]; then
mkdir -p ${PREFIX}/etc/sysconfig/network/if-up.d
mkdir -p ${PREFIX}/etc/sysconfig/network/if-down.d
mkdir -p ${DESTDIR}/etc/sysconfig/network/if-up.d
mkdir -p ${DESTDIR}/etc/sysconfig/network/if-down.d
else
mkdir -p ${PREFIX}/etc/NetworkManager/dispatcher.d
mkdir -p ${DESTDIR}/etc/NetworkManager/dispatcher.d
fi
fi
fi
if [ -d ${PREFIX}/etc/sysconfig -a ! -f ${PREFIX}/etc/sysconfig/shorewall-init ]; then
install_file sysconfig ${PREFIX}/etc/sysconfig/shorewall-init 0644
if [ -d ${DESTDIR}/etc/sysconfig -a ! -f ${DESTDIR}/etc/sysconfig/shorewall-init ]; then
install_file sysconfig ${DESTDIR}/etc/sysconfig/shorewall-init 0644
fi
fi
@ -262,30 +264,30 @@ fi
# Install the ifupdown script
#
mkdir -p ${PREFIX}/usr/share/shorewall-init
mkdir -p ${DESTDIR}/usr/share/shorewall-init
install_file ifupdown.sh ${PREFIX}/usr/share/shorewall-init/ifupdown 0544
install_file ifupdown.sh ${DESTDIR}/usr/share/shorewall-init/ifupdown 0544
if [ -d ${PREFIX}/etc/NetworkManager ]; then
install_file ifupdown.sh ${PREFIX}/etc/NetworkManager/dispatcher.d/01-shorewall 0544
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
install_file ifupdown.sh ${DESTDIR}/etc/NetworkManager/dispatcher.d/01-shorewall 0544
fi
if [ -n "$DEBIAN" ]; then
install_file ifupdown.sh ${PREFIX}/etc/network/if-up.d/shorewall 0544
install_file ifupdown.sh ${PREFIX}/etc/network/if-post-down.d/shorewall 0544
install_file ifupdown.sh ${DESTDIR}/etc/network/if-up.d/shorewall 0544
install_file ifupdown.sh ${DESTDIR}/etc/network/if-post-down.d/shorewall 0544
elif [ -n "$SUSE" ]; then
install_file ifupdown.sh ${PREFIX}/etc/sysconfig/network/if-up.d/shorewall 0544
install_file ifupdown.sh ${PREFIX}/etc/sysconfig/network/if-down.d/shorewall 0544
install_file ifupdown.sh ${DESTDIR}/etc/sysconfig/network/if-up.d/shorewall 0544
install_file ifupdown.sh ${DESTDIR}/etc/sysconfig/network/if-down.d/shorewall 0544
elif [ -n "$REDHAT" ]; then
if [ -f ${PREFIX}/sbin/ifup-local -o -f ${PREFIX}/sbin/ifdown-local ]; then
if [ -f ${DESTDIR}/sbin/ifup-local -o -f ${DESTDIR}/sbin/ifdown-local ]; then
echo "WARNING: /sbin/ifup-local and/or /sbin/ifdown-local already exist; up/down events will not be handled"
else
install_file ifupdown.sh ${PREFIX}/sbin/ifup-local 0544
install_file ifupdown.sh ${PREFIX}/sbin/ifdown-local 0544
install_file ifupdown.sh ${DESTDIR}/sbin/ifup-local 0544
install_file ifupdown.sh ${DESTDIR}/sbin/ifdown-local 0544
fi
fi
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
ln -sf ../init.d/shorewall-init /etc/rcS.d/S38shorewall-init
@ -318,11 +320,11 @@ if [ -z "$PREFIX" ]; then
else
if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
if [ -n "${PREFIX}" ]; then
mkdir -p ${PREFIX}/etc/rcS.d
if [ -n "${DESTDIR}" ]; then
mkdir -p ${DESTDIR}/etc/rcS.d
fi
ln -sf ../init.d/shorewall-init ${PREFIX}/etc/rcS.d/S38shorewall-init
ln -sf ../init.d/shorewall-init ${DESTDIR}/etc/rcS.d/S38shorewall-init
echo "Shorewall Init will start automatically at boot"
fi
fi

View File

@ -85,6 +85,8 @@ install_file() # $1 = source $2 = target $3 = mode
run_install $T $OWNERSHIP -m $3 $1 ${2}
}
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
#
# Parse the run line
#
@ -136,7 +138,7 @@ T='-T'
case $(uname) in
CYGWIN*)
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
fi
@ -156,14 +158,14 @@ esac
OWNERSHIP="-o $OWNER -g $GROUP"
if [ -n "$PREFIX" ]; then
if [ -n "$DESTDIR" ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
elif [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
DEBIAN=yes
elif [ -f /etc/slackware-version ] ; then
@ -185,29 +187,29 @@ echo "Installing Shorewall Lite Version $VERSION"
#
# Check for /etc/shorewall-lite
#
if [ -z "$PREFIX" -a -d /etc/shorewall-lite ]; then
if [ -z "$DESTDIR" -a -d /etc/shorewall-lite ]; then
[ -f /etc/shorewall-lite/shorewall.conf ] && \
mv -f /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall-lite.conf
else
rm -rf ${PREFIX}/etc/shorewall-lite
rm -rf ${PREFIX}/usr/share/shorewall-lite
rm -rf ${PREFIX}/var/lib/shorewall-lite
rm -rf ${DESTDIR}/etc/shorewall-lite
rm -rf ${DESTDIR}/usr/share/shorewall-lite
rm -rf ${DESTDIR}/var/lib/shorewall-lite
fi
#
# Check for /sbin/shorewall-lite
#
if [ -f ${PREFIX}/sbin/shorewall-lite ]; then
if [ -f ${DESTDIR}/sbin/shorewall-lite ]; then
first_install=""
else
first_install="Yes"
fi
delete_file ${PREFIX}/usr/share/shorewall-lite/xmodules
delete_file ${DESTDIR}/usr/share/shorewall-lite/xmodules
install_file shorewall-lite ${PREFIX}/sbin/shorewall-lite 0544
install_file shorewall-lite ${DESTDIR}/sbin/shorewall-lite 0544
echo "Shorewall Lite control program installed in ${PREFIX}/sbin/shorewall-lite"
echo "Shorewall Lite control program installed in ${DESTDIR}/sbin/shorewall-lite"
#
# Install the Firewall Script
@ -215,85 +217,85 @@ echo "Shorewall Lite control program installed in ${PREFIX}/sbin/shorewall-lite"
if [ -n "$DEBIAN" ]; then
install_file init.debian.sh /etc/init.d/shorewall-lite 0544
elif [ -n "$ARCHLINUX" ]; then
install_file init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544
else
install_file init.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544
fi
echo "Shorewall Lite script installed in ${PREFIX}${DEST}/$INIT"
echo "Shorewall Lite script installed in ${DESTDIR}${DEST}/$INIT"
#
# Create /etc/shorewall-lite, /usr/share/shorewall-lite and /var/lib/shorewall-lite if needed
#
mkdir -p ${PREFIX}/etc/shorewall-lite
mkdir -p ${PREFIX}/usr/share/shorewall-lite
mkdir -p ${PREFIX}/var/lib/shorewall-lite
mkdir -p ${DESTDIR}/etc/shorewall-lite
mkdir -p ${DESTDIR}/usr/share/shorewall-lite
mkdir -p ${DESTDIR}/var/lib/shorewall-lite
chmod 755 ${PREFIX}/etc/shorewall-lite
chmod 755 ${PREFIX}/usr/share/shorewall-lite
chmod 755 ${DESTDIR}/etc/shorewall-lite
chmod 755 ${DESTDIR}/usr/share/shorewall-lite
if [ -n "$PREFIX" ]; then
mkdir -p ${PREFIX}/etc/logrotate.d
chmod 755 ${PREFIX}/etc/logrotate.d
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}/etc/logrotate.d
chmod 755 ${DESTDIR}/etc/logrotate.d
fi
#
# Install the config file
#
if [ ! -f ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf ]; then
run_install $OWNERSHIP -m 0744 shorewall-lite.conf ${PREFIX}/etc/shorewall-lite
echo "Config file installed as ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf"
if [ ! -f ${DESTDIR}/etc/shorewall-lite/shorewall-lite.conf ]; then
run_install $OWNERSHIP -m 0744 shorewall-lite.conf ${DESTDIR}/etc/shorewall-lite
echo "Config file installed as ${DESTDIR}/etc/shorewall-lite/shorewall-lite.conf"
fi
if [ -n "$ARCHLINUX" ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall-lite/shorewall.conf
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/shorewall-lite/shorewall.conf
fi
#
# Install the Makefile
#
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall-lite
echo "Makefile installed as ${PREFIX}/etc/shorewall-lite/Makefile"
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}/etc/shorewall-lite
echo "Makefile installed as ${DESTDIR}/etc/shorewall-lite/Makefile"
#
# Install the default config path file
#
install_file configpath ${PREFIX}/usr/share/shorewall-lite/configpath 0644
echo "Default config path file installed as ${PREFIX}/usr/share/shorewall-lite/configpath"
install_file configpath ${DESTDIR}/usr/share/shorewall-lite/configpath 0644
echo "Default config path file installed as ${DESTDIR}/usr/share/shorewall-lite/configpath"
#
# Install the libraries
#
for f in lib.* ; do
if [ -f $f ]; then
install_file $f ${PREFIX}/usr/share/shorewall-lite/$f 0644
echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall-lite/$f"
install_file $f ${DESTDIR}/usr/share/shorewall-lite/$f 0644
echo "Library ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall-lite/$f"
fi
done
ln -sf lib.base ${PREFIX}/usr/share/shorewall-lite/functions
ln -sf lib.base ${DESTDIR}/usr/share/shorewall-lite/functions
echo "Common functions linked through ${PREFIX}/usr/share/shorewall-lite/functions"
echo "Common functions linked through ${DESTDIR}/usr/share/shorewall-lite/functions"
#
# Install Shorecap
#
install_file shorecap ${PREFIX}/usr/share/shorewall-lite/shorecap 0755
install_file shorecap ${DESTDIR}/usr/share/shorewall-lite/shorecap 0755
echo
echo "Capability file builder installed in ${PREFIX}/usr/share/shorewall-lite/shorecap"
echo "Capability file builder installed in ${DESTDIR}/usr/share/shorewall-lite/shorecap"
#
# Install wait4ifup
#
if [ -f wait4ifup ]; then
install_file wait4ifup ${PREFIX}/usr/share/shorewall-lite/wait4ifup 0755
install_file wait4ifup ${DESTDIR}/usr/share/shorewall-lite/wait4ifup 0755
echo
echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall-lite/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall-lite/wait4ifup"
fi
#
@ -301,8 +303,8 @@ fi
#
if [ -f modules ]; then
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall-lite
echo "Modules file installed as ${PREFIX}/usr/share/shorewall-lite/modules"
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}/usr/share/shorewall-lite
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall-lite/modules"
fi
#
@ -312,18 +314,18 @@ fi
if [ -d manpages ]; then
cd manpages
[ -n "$INSTALLD" ] || mkdir -p ${PREFIX}/usr/share/man/man5/ ${PREFIX}/usr/share/man/man8/
[ -n "$INSTALLD" ] || mkdir -p ${DESTDIR}/usr/share/man/man5/ ${DESTDIR}/usr/share/man/man8/
for f in *.5; do
gzip -c $f > $f.gz
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
echo "Man page $f.gz installed to ${PREFIX}/usr/share/man/man5/$f.gz"
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${DESTDIR}/usr/share/man/man5/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}/usr/share/man/man5/$f.gz"
done
for f in *.8; do
gzip -c $f > $f.gz
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
echo "Man page $f.gz installed to ${PREFIX}/usr/share/man/man8/$f.gz"
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${DESTDIR}/usr/share/man/man8/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}/usr/share/man/man8/$f.gz"
done
cd ..
@ -331,27 +333,27 @@ if [ -d manpages ]; then
echo "Man Pages Installed"
fi
if [ -d ${PREFIX}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall-lite
echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall-lite"
if [ -d ${DESTDIR}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}/etc/logrotate.d/shorewall-lite
echo "Logrotate file installed as ${DESTDIR}/etc/logrotate.d/shorewall-lite"
fi
#
# Create the version file
#
echo "$VERSION" > ${PREFIX}/usr/share/shorewall-lite/version
chmod 644 ${PREFIX}/usr/share/shorewall-lite/version
echo "$VERSION" > ${DESTDIR}/usr/share/shorewall-lite/version
chmod 644 ${DESTDIR}/usr/share/shorewall-lite/version
#
# Remove and create the symbolic link to the init script
#
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
rm -f /usr/share/shorewall-lite/init
ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init
fi
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
touch /var/log/shorewall-lite-init.log
if [ -n "$first_install" ]; then

View File

@ -85,6 +85,8 @@ install_file() # $1 = source $2 = target $3 = mode
run_install $T $OWNERSHIP -m $3 $1 ${2}
}
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
#
# Parse the run line
#
@ -114,7 +116,7 @@ INSTALLD='-D'
case $(uname) in
CYGWIN*)
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
fi
@ -125,7 +127,7 @@ case $(uname) in
SPARSE=Yes
;;
Darwin)
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
SPARSE=Yes
@ -171,7 +173,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
# Determine where to install the firewall script
#
if [ -n "$PREFIX" ]; then
if [ -n "$DESTDIR" ]; then
if [ -z "$CYGWIN" ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
@ -179,8 +181,8 @@ if [ -n "$PREFIX" ]; then
fi
fi
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
CYGWIN=
MAC=
@ -227,539 +229,539 @@ echo "Installing Shorewall Version $VERSION"
#
# Check for /sbin/shorewall
#
if [ -f ${PREFIX}/sbin/shorewall ]; then
if [ -f ${DESTDIR}/sbin/shorewall ]; then
first_install=""
else
first_install="Yes"
fi
if [ -z "$CYGWIN" ]; then
install_file shorewall ${PREFIX}/sbin/shorewall 0755
echo "shorewall control program installed in ${PREFIX}/sbin/shorewall"
install_file shorewall ${DESTDIR}/sbin/shorewall 0755
echo "shorewall control program installed in ${DESTDIR}/sbin/shorewall"
else
install_file shorewall ${PREFIX}/bin/shorewall 0755
echo "shorewall control program installed in ${PREFIX}/bin/shorewall"
install_file shorewall ${DESTDIR}/bin/shorewall 0755
echo "shorewall control program installed in ${DESTDIR}/bin/shorewall"
fi
#
# Install the Firewall Script
#
if [ -n "$DEBIAN" ]; then
install_file init.debian.sh ${PREFIX}/etc/init.d/shorewall 0544
install_file init.debian.sh ${DESTDIR}/etc/init.d/shorewall 0544
elif [ -n "$ARCHLINUX" ]; then
install_file init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544
elif [ -n "$SLACKWARE" ]; then
install_file init.slackware.firewall.sh ${PREFIX}${DEST}/rc.firewall 0644
install_file init.slackware.shorewall.sh ${PREFIX}${DEST}/rc.shorewall 0644
install_file init.slackware.firewall.sh ${DESTDIR}${DEST}/rc.firewall 0644
install_file init.slackware.shorewall.sh ${DESTDIR}${DEST}/rc.shorewall 0644
elif [ -n "$INIT" ]; then
install_file init.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544
fi
[ -n "$INIT" ] && echo "Shorewall script installed in ${PREFIX}${DEST}/$INIT"
[ -n "$INIT" ] && echo "Shorewall script installed in ${DESTDIR}${DEST}/$INIT"
#
# Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed
#
mkdir -p ${PREFIX}/etc/shorewall
mkdir -p ${PREFIX}/usr/share/shorewall
mkdir -p ${PREFIX}/usr/share/shorewall/configfiles
mkdir -p ${PREFIX}/var/lib/shorewall
mkdir -p ${DESTDIR}/etc/shorewall
mkdir -p ${DESTDIR}/usr/share/shorewall
mkdir -p ${DESTDIR}/usr/share/shorewall/configfiles
mkdir -p ${DESTDIR}/var/lib/shorewall
chmod 755 ${PREFIX}/etc/shorewall
chmod 755 ${PREFIX}/usr/share/shorewall
chmod 755 ${PREFIX}/usr/share/shorewall/configfiles
chmod 755 ${DESTDIR}/etc/shorewall
chmod 755 ${DESTDIR}/usr/share/shorewall
chmod 755 ${DESTDIR}/usr/share/shorewall/configfiles
if [ -n "$PREFIX" ]; then
mkdir -p ${PREFIX}/etc/logrotate.d
chmod 755 ${PREFIX}/etc/logrotate.d
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}/etc/logrotate.d
chmod 755 ${DESTDIR}/etc/logrotate.d
fi
#
# Install the config file
#
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${DESTDIR}/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
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' ${DESTDIR}/usr/share/shorewall/configfiles/shorewall.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall-lite-init.log|;' ${DESTDIR}/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
if [ ! -f ${DESTDIR}/etc/shorewall/shorewall.conf ]; then
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${DESTDIR}/etc/shorewall
if [ -n "$DEBIAN" ]; then
#
# Make a Debian-like shorewall.conf
#
perl -p -w -i -e 's|^STARTUP_ENABLED=.*|STARTUP_ENABLED=Yes|;' ${PREFIX}/etc/shorewall/shorewall.conf
perl -p -w -i -e 's|^STARTUP_ENABLED=.*|STARTUP_ENABLED=Yes|;' ${DESTDIR}/etc/shorewall/shorewall.conf
fi
echo "Config file installed as ${PREFIX}/etc/shorewall/shorewall.conf"
echo "Config file installed as ${DESTDIR}/etc/shorewall/shorewall.conf"
fi
if [ -n "$ARCHLINUX" ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall/shorewall.conf
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/shorewall/shorewall.conf
fi
#
# Install the zones file
#
run_install $OWNERSHIP -m 0644 configfiles/zones ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/zones ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/zones ]; then
run_install $OWNERSHIP -m 0744 configfiles/zones ${PREFIX}/etc/shorewall
echo "Zones file installed as ${PREFIX}/etc/shorewall/zones"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/zones ]; then
run_install $OWNERSHIP -m 0744 configfiles/zones ${DESTDIR}/etc/shorewall
echo "Zones file installed as ${DESTDIR}/etc/shorewall/zones"
fi
delete_file ${PREFIX}/usr/share/shorewall/compiler
delete_file ${PREFIX}/usr/share/shorewall/lib.accounting
delete_file ${PREFIX}/usr/share/shorewall/lib.actions
delete_file ${PREFIX}/usr/share/shorewall/lib.dynamiczones
delete_file ${PREFIX}/usr/share/shorewall/lib.maclist
delete_file ${PREFIX}/usr/share/shorewall/lib.nat
delete_file ${PREFIX}/usr/share/shorewall/lib.providers
delete_file ${PREFIX}/usr/share/shorewall/lib.proxyarp
delete_file ${PREFIX}/usr/share/shorewall/lib.tc
delete_file ${PREFIX}/usr/share/shorewall/lib.tcrules
delete_file ${PREFIX}/usr/share/shorewall/lib.tunnels
delete_file ${PREFIX}/usr/share/shorewall/prog.header
delete_file ${PREFIX}/usr/share/shorewall/prog.footer
delete_file ${DESTDIR}/usr/share/shorewall/compiler
delete_file ${DESTDIR}/usr/share/shorewall/lib.accounting
delete_file ${DESTDIR}/usr/share/shorewall/lib.actions
delete_file ${DESTDIR}/usr/share/shorewall/lib.dynamiczones
delete_file ${DESTDIR}/usr/share/shorewall/lib.maclist
delete_file ${DESTDIR}/usr/share/shorewall/lib.nat
delete_file ${DESTDIR}/usr/share/shorewall/lib.providers
delete_file ${DESTDIR}/usr/share/shorewall/lib.proxyarp
delete_file ${DESTDIR}/usr/share/shorewall/lib.tc
delete_file ${DESTDIR}/usr/share/shorewall/lib.tcrules
delete_file ${DESTDIR}/usr/share/shorewall/lib.tunnels
delete_file ${DESTDIR}/usr/share/shorewall/prog.header
delete_file ${DESTDIR}/usr/share/shorewall/prog.footer
#
# Install wait4ifup
#
install_file wait4ifup ${PREFIX}/usr/share/shorewall/wait4ifup 0755
install_file wait4ifup ${DESTDIR}/usr/share/shorewall/wait4ifup 0755
echo
echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall/wait4ifup"
#
# Install the policy file
#
install_file configfiles/policy ${PREFIX}/usr/share/shorewall/configfiles/policy 0644
install_file configfiles/policy ${DESTDIR}/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
echo "Policy file installed as ${PREFIX}/etc/shorewall/policy"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/policy ]; then
run_install $OWNERSHIP -m 0600 configfiles/policy ${DESTDIR}/etc/shorewall
echo "Policy file installed as ${DESTDIR}/etc/shorewall/policy"
fi
#
# Install the interfaces file
#
run_install $OWNERSHIP -m 0644 configfiles/interfaces ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/interfaces ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/interfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/interfaces ${PREFIX}/etc/shorewall
echo "Interfaces file installed as ${PREFIX}/etc/shorewall/interfaces"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/interfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/interfaces ${DESTDIR}/etc/shorewall
echo "Interfaces file installed as ${DESTDIR}/etc/shorewall/interfaces"
fi
#
# Install the hosts file
#
run_install $OWNERSHIP -m 0644 configfiles/hosts ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/hosts ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/hosts ]; then
run_install $OWNERSHIP -m 0600 configfiles/hosts ${PREFIX}/etc/shorewall
echo "Hosts file installed as ${PREFIX}/etc/shorewall/hosts"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/hosts ]; then
run_install $OWNERSHIP -m 0600 configfiles/hosts ${DESTDIR}/etc/shorewall
echo "Hosts file installed as ${DESTDIR}/etc/shorewall/hosts"
fi
#
# Install the rules file
#
run_install $OWNERSHIP -m 0644 configfiles/rules ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/rules ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/rules ${PREFIX}/etc/shorewall
echo "Rules file installed as ${PREFIX}/etc/shorewall/rules"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/rules ${DESTDIR}/etc/shorewall
echo "Rules file installed as ${DESTDIR}/etc/shorewall/rules"
fi
#
# Install the NAT file
#
run_install $OWNERSHIP -m 0644 configfiles/nat ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/nat ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/nat ]; then
run_install $OWNERSHIP -m 0600 configfiles/nat ${PREFIX}/etc/shorewall
echo "NAT file installed as ${PREFIX}/etc/shorewall/nat"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/nat ]; then
run_install $OWNERSHIP -m 0600 configfiles/nat ${DESTDIR}/etc/shorewall
echo "NAT file installed as ${DESTDIR}/etc/shorewall/nat"
fi
#
# Install the NETMAP file
#
run_install $OWNERSHIP -m 0644 configfiles/netmap ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/netmap ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/netmap ]; then
run_install $OWNERSHIP -m 0600 configfiles/netmap ${PREFIX}/etc/shorewall
echo "NETMAP file installed as ${PREFIX}/etc/shorewall/netmap"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/netmap ]; then
run_install $OWNERSHIP -m 0600 configfiles/netmap ${DESTDIR}/etc/shorewall
echo "NETMAP file installed as ${DESTDIR}/etc/shorewall/netmap"
fi
#
# Install the Parameters file
#
run_install $OWNERSHIP -m 0644 configfiles/params ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/params ${DESTDIR}/usr/share/shorewall/configfiles
if [ -f ${PREFIX}/etc/shorewall/params ]; then
chmod 0644 ${PREFIX}/etc/shorewall/params
if [ -f ${DESTDIR}/etc/shorewall/params ]; then
chmod 0644 ${DESTDIR}/etc/shorewall/params
else
run_install $OWNERSHIP -m 0644 configfiles/params ${PREFIX}/etc/shorewall
echo "Parameter file installed as ${PREFIX}/etc/shorewall/params"
run_install $OWNERSHIP -m 0644 configfiles/params ${DESTDIR}/etc/shorewall
echo "Parameter file installed as ${DESTDIR}/etc/shorewall/params"
fi
#
# Install the proxy ARP file
#
run_install $OWNERSHIP -m 0644 configfiles/proxyarp ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/proxyarp ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/proxyarp ]; then
run_install $OWNERSHIP -m 0600 configfiles/proxyarp ${PREFIX}/etc/shorewall
echo "Proxy ARP file installed as ${PREFIX}/etc/shorewall/proxyarp"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/proxyarp ]; then
run_install $OWNERSHIP -m 0600 configfiles/proxyarp ${DESTDIR}/etc/shorewall
echo "Proxy ARP file installed as ${DESTDIR}/etc/shorewall/proxyarp"
fi
#
# Install the Stopped Routing file
#
run_install $OWNERSHIP -m 0644 configfiles/routestopped ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/routestopped ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/routestopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/routestopped ${PREFIX}/etc/shorewall
echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall/routestopped"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/routestopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/routestopped ${DESTDIR}/etc/shorewall
echo "Stopped Routing file installed as ${DESTDIR}/etc/shorewall/routestopped"
fi
#
# Install the Mac List file
#
run_install $OWNERSHIP -m 0644 configfiles/maclist ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/maclist ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/maclist ]; then
run_install $OWNERSHIP -m 0600 configfiles/maclist ${PREFIX}/etc/shorewall
echo "MAC list file installed as ${PREFIX}/etc/shorewall/maclist"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/maclist ]; then
run_install $OWNERSHIP -m 0600 configfiles/maclist ${DESTDIR}/etc/shorewall
echo "MAC list file installed as ${DESTDIR}/etc/shorewall/maclist"
fi
#
# Install the Masq file
#
run_install $OWNERSHIP -m 0644 configfiles/masq ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/masq ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/masq ]; then
run_install $OWNERSHIP -m 0600 configfiles/masq ${PREFIX}/etc/shorewall
echo "Masquerade file installed as ${PREFIX}/etc/shorewall/masq"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/masq ]; then
run_install $OWNERSHIP -m 0600 configfiles/masq ${DESTDIR}/etc/shorewall
echo "Masquerade file installed as ${DESTDIR}/etc/shorewall/masq"
fi
#
# Install the Notrack file
#
run_install $OWNERSHIP -m 0644 configfiles/notrack ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/notrack ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/notrack ]; then
run_install $OWNERSHIP -m 0600 configfiles/notrack ${PREFIX}/etc/shorewall
echo "Notrack file installed as ${PREFIX}/etc/shorewall/notrack"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/notrack ]; then
run_install $OWNERSHIP -m 0600 configfiles/notrack ${DESTDIR}/etc/shorewall
echo "Notrack file installed as ${DESTDIR}/etc/shorewall/notrack"
fi
#
# Install the Modules file
#
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall
echo "Modules file installed as ${PREFIX}/usr/share/shorewall/modules"
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}/usr/share/shorewall
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall/modules"
#
# Install the Module Helpers file
#
run_install $OWNERSHIP -m 0600 helpers ${PREFIX}/usr/share/shorewall
echo "Helper modules file installed as ${PREFIX}/usr/share/shorewall/helpers"
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}/usr/share/shorewall
echo "Helper modules file installed as ${DESTDIR}/usr/share/shorewall/helpers"
#
# Install the TC Rules file
#
run_install $OWNERSHIP -m 0644 configfiles/tcrules ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcrules ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcrules ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcrules ${PREFIX}/etc/shorewall
echo "TC Rules file installed as ${PREFIX}/etc/shorewall/tcrules"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcrules ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcrules ${DESTDIR}/etc/shorewall
echo "TC Rules file installed as ${DESTDIR}/etc/shorewall/tcrules"
fi
#
# Install the TC Interfaces file
#
run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcinterfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcinterfaces ${PREFIX}/etc/shorewall
echo "TC Interfaces file installed as ${PREFIX}/etc/shorewall/tcinterfaces"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcinterfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcinterfaces ${DESTDIR}/etc/shorewall
echo "TC Interfaces file installed as ${DESTDIR}/etc/shorewall/tcinterfaces"
fi
#
# Install the TC Priority file
#
run_install $OWNERSHIP -m 0644 configfiles/tcpri ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcpri ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcpri ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcpri ${PREFIX}/etc/shorewall
echo "TC Priority file installed as ${PREFIX}/etc/shorewall/tcpri"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcpri ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcpri ${DESTDIR}/etc/shorewall
echo "TC Priority file installed as ${DESTDIR}/etc/shorewall/tcpri"
fi
#
# Install the TOS file
#
run_install $OWNERSHIP -m 0644 configfiles/tos ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tos ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tos ]; then
run_install $OWNERSHIP -m 0600 configfiles/tos ${PREFIX}/etc/shorewall
echo "TOS file installed as ${PREFIX}/etc/shorewall/tos"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tos ]; then
run_install $OWNERSHIP -m 0600 configfiles/tos ${DESTDIR}/etc/shorewall
echo "TOS file installed as ${DESTDIR}/etc/shorewall/tos"
fi
#
# Install the Tunnels file
#
run_install $OWNERSHIP -m 0644 configfiles/tunnels ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tunnels ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tunnels ]; then
run_install $OWNERSHIP -m 0600 configfiles/tunnels ${PREFIX}/etc/shorewall
echo "Tunnels file installed as ${PREFIX}/etc/shorewall/tunnels"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tunnels ]; then
run_install $OWNERSHIP -m 0600 configfiles/tunnels ${DESTDIR}/etc/shorewall
echo "Tunnels file installed as ${DESTDIR}/etc/shorewall/tunnels"
fi
#
# Install the blacklist file
#
run_install $OWNERSHIP -m 0644 configfiles/blacklist ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/blacklist ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/blacklist ]; then
run_install $OWNERSHIP -m 0600 configfiles/blacklist ${PREFIX}/etc/shorewall
echo "Blacklist file installed as ${PREFIX}/etc/shorewall/blacklist"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/blacklist ]; then
run_install $OWNERSHIP -m 0600 configfiles/blacklist ${DESTDIR}/etc/shorewall
echo "Blacklist file installed as ${DESTDIR}/etc/shorewall/blacklist"
fi
#
# Install the findgw file
#
run_install $OWNERSHIP -m 0644 configfiles/findgw ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/findgw ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/findgw ]; then
run_install $OWNERSHIP -m 0600 configfiles/findgw ${PREFIX}/etc/shorewall
echo "Find GW file installed as ${PREFIX}/etc/shorewall/findgw"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/findgw ]; then
run_install $OWNERSHIP -m 0600 configfiles/findgw ${DESTDIR}/etc/shorewall
echo "Find GW file installed as ${DESTDIR}/etc/shorewall/findgw"
fi
#
# Delete the Routes file
#
delete_file ${PREFIX}/etc/shorewall/routes
delete_file ${DESTDIR}/etc/shorewall/routes
#
# Delete the tcstart file
#
delete_file ${PREFIX}/usr/share/shorewall/tcstart
delete_file ${DESTDIR}/usr/share/shorewall/tcstart
#
# Delete the Limits Files
#
delete_file ${PREFIX}/usr/share/shorewall/action.Limit
delete_file ${PREFIX}/usr/share/shorewall/Limit
delete_file ${DESTDIR}/usr/share/shorewall/action.Limit
delete_file ${DESTDIR}/usr/share/shorewall/Limit
#
# Delete the xmodules file
#
delete_file ${PREFIX}/usr/share/shorewall/xmodules
delete_file ${DESTDIR}/usr/share/shorewall/xmodules
#
# Install the Providers file
#
run_install $OWNERSHIP -m 0644 configfiles/providers ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/providers ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/providers ]; then
run_install $OWNERSHIP -m 0600 configfiles/providers ${PREFIX}/etc/shorewall
echo "Providers file installed as ${PREFIX}/etc/shorewall/providers"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/providers ]; then
run_install $OWNERSHIP -m 0600 configfiles/providers ${DESTDIR}/etc/shorewall
echo "Providers file installed as ${DESTDIR}/etc/shorewall/providers"
fi
#
# Install the Route Rules file
#
run_install $OWNERSHIP -m 0644 configfiles/route_rules ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/route_rules ${DESTDIR}/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
echo "Routing rules file installed as ${PREFIX}/etc/shorewall/route_rules"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/route_rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/route_rules ${DESTDIR}/etc/shorewall
echo "Routing rules file installed as ${DESTDIR}/etc/shorewall/route_rules"
fi
#
# Install the tcclasses file
#
run_install $OWNERSHIP -m 0644 configfiles/tcclasses ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcclasses ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcclasses ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclasses ${PREFIX}/etc/shorewall
echo "TC Classes file installed as ${PREFIX}/etc/shorewall/tcclasses"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcclasses ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclasses ${DESTDIR}/etc/shorewall
echo "TC Classes file installed as ${DESTDIR}/etc/shorewall/tcclasses"
fi
#
# Install the tcdevices file
#
run_install $OWNERSHIP -m 0644 configfiles/tcdevices ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcdevices ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcdevices ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcdevices ${PREFIX}/etc/shorewall
echo "TC Devices file installed as ${PREFIX}/etc/shorewall/tcdevices"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcdevices ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcdevices ${DESTDIR}/etc/shorewall
echo "TC Devices file installed as ${DESTDIR}/etc/shorewall/tcdevices"
fi
#
# Install the tcfilters file
#
run_install $OWNERSHIP -m 0644 configfiles/tcfilters ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcfilters ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcfilters ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcfilters ${PREFIX}/etc/shorewall
echo "TC Filters file installed as ${PREFIX}/etc/shorewall/tcfilters"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcfilters ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcfilters ${DESTDIR}/etc/shorewall
echo "TC Filters file installed as ${DESTDIR}/etc/shorewall/tcfilters"
fi
#
# Install the default config path file
#
install_file configpath ${PREFIX}/usr/share/shorewall/configpath 0644
echo "Default config path file installed as ${PREFIX}/usr/share/shorewall/configpath"
install_file configpath ${DESTDIR}/usr/share/shorewall/configpath 0644
echo "Default config path file installed as ${DESTDIR}/usr/share/shorewall/configpath"
#
# Install the init file
#
run_install $OWNERSHIP -m 0644 configfiles/init ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/init ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/init ]; then
run_install $OWNERSHIP -m 0600 configfiles/init ${PREFIX}/etc/shorewall
echo "Init file installed as ${PREFIX}/etc/shorewall/init"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/init ]; then
run_install $OWNERSHIP -m 0600 configfiles/init ${DESTDIR}/etc/shorewall
echo "Init file installed as ${DESTDIR}/etc/shorewall/init"
fi
#
# Install the initdone file
#
run_install $OWNERSHIP -m 0644 configfiles/initdone ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/initdone ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/initdone ]; then
run_install $OWNERSHIP -m 0600 configfiles/initdone ${PREFIX}/etc/shorewall
echo "Initdone file installed as ${PREFIX}/etc/shorewall/initdone"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/initdone ]; then
run_install $OWNERSHIP -m 0600 configfiles/initdone ${DESTDIR}/etc/shorewall
echo "Initdone file installed as ${DESTDIR}/etc/shorewall/initdone"
fi
#
# Install the start file
#
run_install $OWNERSHIP -m 0644 configfiles/start ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/start ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/start ]; then
run_install $OWNERSHIP -m 0600 configfiles/start ${PREFIX}/etc/shorewall
echo "Start file installed as ${PREFIX}/etc/shorewall/start"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/start ]; then
run_install $OWNERSHIP -m 0600 configfiles/start ${DESTDIR}/etc/shorewall
echo "Start file installed as ${DESTDIR}/etc/shorewall/start"
fi
#
# Install the stop file
#
run_install $OWNERSHIP -m 0644 configfiles/stop ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/stop ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/stop ]; then
run_install $OWNERSHIP -m 0600 configfiles/stop ${PREFIX}/etc/shorewall
echo "Stop file installed as ${PREFIX}/etc/shorewall/stop"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/stop ]; then
run_install $OWNERSHIP -m 0600 configfiles/stop ${DESTDIR}/etc/shorewall
echo "Stop file installed as ${DESTDIR}/etc/shorewall/stop"
fi
#
# Install the stopped file
#
run_install $OWNERSHIP -m 0644 configfiles/stopped ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/stopped ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/stopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/stopped ${PREFIX}/etc/shorewall
echo "Stopped file installed as ${PREFIX}/etc/shorewall/stopped"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/stopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/stopped ${DESTDIR}/etc/shorewall
echo "Stopped file installed as ${DESTDIR}/etc/shorewall/stopped"
fi
#
# Install the ECN file
#
run_install $OWNERSHIP -m 0644 configfiles/ecn ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/ecn ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/ecn ]; then
run_install $OWNERSHIP -m 0600 configfiles/ecn ${PREFIX}/etc/shorewall
echo "ECN file installed as ${PREFIX}/etc/shorewall/ecn"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/ecn ]; then
run_install $OWNERSHIP -m 0600 configfiles/ecn ${DESTDIR}/etc/shorewall
echo "ECN file installed as ${DESTDIR}/etc/shorewall/ecn"
fi
#
# Install the Accounting file
#
run_install $OWNERSHIP -m 0644 configfiles/accounting ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/accounting ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/accounting ]; then
run_install $OWNERSHIP -m 0600 configfiles/accounting ${PREFIX}/etc/shorewall
echo "Accounting file installed as ${PREFIX}/etc/shorewall/accounting"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/accounting ]; then
run_install $OWNERSHIP -m 0600 configfiles/accounting ${DESTDIR}/etc/shorewall
echo "Accounting file installed as ${DESTDIR}/etc/shorewall/accounting"
fi
#
# Install the private library file
#
run_install $OWNERSHIP -m 0644 configfiles/lib.private ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/lib.private ${DESTDIR}/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
echo "Private library file installed as ${PREFIX}/etc/shorewall/lib.private"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/lib.private ]; then
run_install $OWNERSHIP -m 0600 configfiles/lib.private ${DESTDIR}/etc/shorewall
echo "Private library file installed as ${DESTDIR}/etc/shorewall/lib.private"
fi
#
# Install the Started file
#
run_install $OWNERSHIP -m 0644 configfiles/started ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/started ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/started ]; then
run_install $OWNERSHIP -m 0600 configfiles/started ${PREFIX}/etc/shorewall
echo "Started file installed as ${PREFIX}/etc/shorewall/started"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/started ]; then
run_install $OWNERSHIP -m 0600 configfiles/started ${DESTDIR}/etc/shorewall
echo "Started file installed as ${DESTDIR}/etc/shorewall/started"
fi
#
# Install the Restored file
#
run_install $OWNERSHIP -m 0644 configfiles/restored ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/restored ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/restored ]; then
run_install $OWNERSHIP -m 0600 configfiles/restored ${PREFIX}/etc/shorewall
echo "Restored file installed as ${PREFIX}/etc/shorewall/restored"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/restored ]; then
run_install $OWNERSHIP -m 0600 configfiles/restored ${DESTDIR}/etc/shorewall
echo "Restored file installed as ${DESTDIR}/etc/shorewall/restored"
fi
#
# Install the Clear file
#
run_install $OWNERSHIP -m 0644 configfiles/clear ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/clear ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/clear ]; then
run_install $OWNERSHIP -m 0600 configfiles/clear ${PREFIX}/etc/shorewall
echo "Clear file installed as ${PREFIX}/etc/shorewall/clear"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/clear ]; then
run_install $OWNERSHIP -m 0600 configfiles/clear ${DESTDIR}/etc/shorewall
echo "Clear file installed as ${DESTDIR}/etc/shorewall/clear"
fi
#
# Install the Isusable file
#
run_install $OWNERSHIP -m 0644 configfiles/isusable ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/isusable ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/isusable ]; then
run_install $OWNERSHIP -m 0600 configfiles/isusable ${PREFIX}/etc/shorewall
echo "Isusable file installed as ${PREFIX}/etc/shorewall/isusable"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/isusable ]; then
run_install $OWNERSHIP -m 0600 configfiles/isusable ${DESTDIR}/etc/shorewall
echo "Isusable file installed as ${DESTDIR}/etc/shorewall/isusable"
fi
#
# Install the Refresh file
#
run_install $OWNERSHIP -m 0644 configfiles/refresh ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/refresh ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/refresh ]; then
run_install $OWNERSHIP -m 0600 configfiles/refresh ${PREFIX}/etc/shorewall
echo "Refresh file installed as ${PREFIX}/etc/shorewall/refresh"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/refresh ]; then
run_install $OWNERSHIP -m 0600 configfiles/refresh ${DESTDIR}/etc/shorewall
echo "Refresh file installed as ${DESTDIR}/etc/shorewall/refresh"
fi
#
# Install the Refreshed file
#
run_install $OWNERSHIP -m 0644 configfiles/refreshed ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/refreshed ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/refreshed ]; then
run_install $OWNERSHIP -m 0600 configfiles/refreshed ${PREFIX}/etc/shorewall
echo "Refreshed file installed as ${PREFIX}/etc/shorewall/refreshed"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/refreshed ]; then
run_install $OWNERSHIP -m 0600 configfiles/refreshed ${DESTDIR}/etc/shorewall
echo "Refreshed file installed as ${DESTDIR}/etc/shorewall/refreshed"
fi
#
# Install the Tcclear file
#
run_install $OWNERSHIP -m 0644 configfiles/tcclear ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcclear ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/tcclear ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclear ${PREFIX}/etc/shorewall
echo "Tcclear file installed as ${PREFIX}/etc/shorewall/tcclear"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcclear ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclear ${DESTDIR}/etc/shorewall
echo "Tcclear file installed as ${DESTDIR}/etc/shorewall/tcclear"
fi
#
# Install the Standard Actions file
#
install_file actions.std ${PREFIX}/usr/share/shorewall/actions.std 0644
echo "Standard actions file installed as ${PREFIX}/usr/shared/shorewall/actions.std"
install_file actions.std ${DESTDIR}/usr/share/shorewall/actions.std 0644
echo "Standard actions file installed as ${DESTDIR}/usr/shared/shorewall/actions.std"
#
# Install the Actions file
#
run_install $OWNERSHIP -m 0644 configfiles/actions ${PREFIX}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/actions ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall/actions ]; then
run_install $OWNERSHIP -m 0644 configfiles/actions ${PREFIX}/etc/shorewall
echo "Actions file installed as ${PREFIX}/etc/shorewall/actions"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/actions ]; then
run_install $OWNERSHIP -m 0644 configfiles/actions ${DESTDIR}/etc/shorewall
echo "Actions file installed as ${DESTDIR}/etc/shorewall/actions"
fi
#
# Install the Makefiles
#
install-file Makefile-lite ${PREFIX}/usr/share/shorewall/configfiles/Makefile 0644
install-file Makefile-lite ${DESTDIR}/usr/share/shorewall/configfiles/Makefile 0644
if [ -z "$SPARSE" ]; then
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall
echo "Makefile installed as ${PREFIX}/etc/shorewall/Makefile"
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}/etc/shorewall
echo "Makefile installed as ${DESTDIR}/etc/shorewall/Makefile"
fi
#
# Install the Action files
#
for f in action.* ; do
install_file $f ${PREFIX}/usr/share/shorewall/$f 0644
echo "Action ${f#*.} file installed as ${PREFIX}/usr/share/shorewall/$f"
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Action ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall/$f"
done
# Install the Macro files
@ -767,8 +769,8 @@ done
cd Macros
for f in macro.* ; do
install_file $f ${PREFIX}/usr/share/shorewall/$f 0644
echo "Macro ${f#*.} file installed as ${PREFIX}/usr/share/shorewall/$f"
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Macro ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall/$f"
done
cd ..
@ -777,54 +779,54 @@ cd ..
#
for f in lib.* ; do
if [ -f $f ]; then
install_file $f ${PREFIX}/usr/share/shorewall/$f 0644
echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall/$f"
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Library ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall/$f"
fi
done
#
# Symbolically link 'functions' to lib.base
#
ln -sf lib.base ${PREFIX}/usr/share/shorewall/functions
ln -sf lib.base ${DESTDIR}/usr/share/shorewall/functions
#
# /usr/share/shorewall/Shorewall if needed
#
mkdir -p ${PREFIX}/usr/share/shorewall/Shorewall
chmod 755 ${PREFIX}/usr/share/shorewall/Shorewall
mkdir -p ${DESTDIR}/usr/share/shorewall/Shorewall
chmod 755 ${DESTDIR}/usr/share/shorewall/Shorewall
#
# Install the Compiler
#
cd Perl
install_file compiler.pl ${PREFIX}/usr/share/shorewall/compiler.pl 0755
install_file compiler.pl ${DESTDIR}/usr/share/shorewall/compiler.pl 0755
echo
echo "Compiler installed in ${PREFIX}/usr/share/shorewall/compiler.pl"
echo "Compiler installed in ${DESTDIR}/usr/share/shorewall/compiler.pl"
#
# Install the libraries
#
for f in Shorewall/*.pm ; do
install_file $f ${PREFIX}/usr/share/shorewall/$f 0644
echo "Module ${f%.*} installed as ${PREFIX}/usr/share/shorewall/$f"
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Module ${f%.*} installed as ${DESTDIR}/usr/share/shorewall/$f"
done
#
# Install the program skeleton files
#
for f in prog.* ; do
install_file $f ${PREFIX}/usr/share/shorewall/$f 0644
echo "Program skeleton file ${f#*.} installed as ${PREFIX}/usr/share/shorewall/$f"
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Program skeleton file ${f#*.} installed as ${DESTDIR}/usr/share/shorewall/$f"
done
cd ..
#
# Create the version file
#
echo "$VERSION" > ${PREFIX}/usr/share/shorewall/version
chmod 644 ${PREFIX}/usr/share/shorewall/version
echo "$VERSION" > ${DESTDIR}/usr/share/shorewall/version
chmod 644 ${DESTDIR}/usr/share/shorewall/version
#
# Remove and create the symbolic link to the init script
#
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
rm -f /usr/share/shorewall/init
ln -s ${DEST}/${INIT} /usr/share/shorewall/init
fi
@ -837,18 +839,18 @@ if [ -d manpages ]; then
cd manpages
[ -n "$INSTALLD" ] || mkdir -p ${PREFIX}${MANDIR}/man5/ ${PREFIX}${MANDIR}/man8/
[ -n "$INSTALLD" ] || mkdir -p ${DESTDIR}${MANDIR}/man5/ ${DESTDIR}${MANDIR}/man8/
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"
run_install $INSTALLD -m 0644 $f.gz ${DESTDIR}${MANDIR}/man5/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man5/$f.gz"
done
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"
run_install $INSTALLD -m 0644 $f.gz ${DESTDIR}${MANDIR}/man8/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man8/$f.gz"
done
cd ..
@ -857,17 +859,17 @@ if [ -d manpages ]; then
fi
if [ -d ${PREFIX}/etc/logrotate.d ]; then
install_file logrotate ${PREFIX}/etc/logrotate.d/shorewall 0644
echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall"
if [ -d ${DESTDIR}/etc/logrotate.d ]; then
install_file logrotate ${DESTDIR}/etc/logrotate.d/shorewall 0644
echo "Logrotate file installed as ${DESTDIR}/etc/logrotate.d/shorewall"
fi
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
rm -rf /usr/share/shorewall-perl
rm -rf /usr/share/shorewall-shell
fi
if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
if [ -n "$DEBIAN" ]; then
install_file default.debian /etc/default/shorewall 0644
ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall

View File

@ -85,6 +85,8 @@ install_file() # $1 = source $2 = target $3 = mode
run_install $T $OWNERSHIP -m $3 $1 ${2}
}
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
#
# Parse the run line
#
@ -134,7 +136,7 @@ T='-T'
case $(uname) in
CYGWIN*)
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
fi
@ -154,14 +156,14 @@ esac
OWNERSHIP="-o $OWNER -g $GROUP"
if [ -n "$PREFIX" ]; then
if [ -n "$DESTDIR" ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
elif [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
DEBIAN=yes
elif [ -f /etc/slackware-version ] ; then
@ -183,123 +185,123 @@ echo "Installing Shorewall6 Lite Version $VERSION"
#
# Check for /etc/shorewall6-lite
#
if [ -z "$PREFIX" -a -d /etc/shorewall6-lite ]; then
if [ -z "$DESTDIR" -a -d /etc/shorewall6-lite ]; then
[ -f /etc/shorewall6-lite/shorewall.conf ] && \
mv -f /etc/shorewall6-lite/shorewall.conf /etc/shorewall6-lite/shorewall6-lite.conf
else
rm -rf ${PREFIX}/etc/shorewall6-lite
rm -rf ${PREFIX}/usr/share/shorewall6-lite
rm -rf ${PREFIX}/var/lib/shorewall6-lite
rm -rf ${DESTDIR}/etc/shorewall6-lite
rm -rf ${DESTDIR}/usr/share/shorewall6-lite
rm -rf ${DESTDIR}/var/lib/shorewall6-lite
fi
#
# Check for /sbin/shorewall6-lite
#
if [ -f ${PREFIX}/sbin/shorewall6-lite ]; then
if [ -f ${DESTDIR}/sbin/shorewall6-lite ]; then
first_install=""
else
first_install="Yes"
fi
delete_file ${PREFIX}/usr/share/shorewall6-lite/xmodules
delete_file ${DESTDIR}/usr/share/shorewall6-lite/xmodules
install_file shorewall6-lite ${PREFIX}/sbin/shorewall6-lite 0544
install_file shorewall6-lite ${DESTDIR}/sbin/shorewall6-lite 0544
echo "Shorewall6 Lite control program installed in ${PREFIX}/sbin/shorewall6-lite"
echo "Shorewall6 Lite control program installed in ${DESTDIR}/sbin/shorewall6-lite"
#
# Install the Firewall Script
#
if [ -n "$DEBIAN" ]; then
install_file init.debian.sh ${PREFIX}/etc/init.d/shorewall6-lite 0544
install_file init.debian.sh ${DESTDIR}/etc/init.d/shorewall6-lite 0544
elif [ -n "$ARCHLINUX" ]; then
install_file init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544
else
install_file init.sh ${PREFIX}${DEST}/$INIT 0544
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544
fi
echo "Shorewall6 Lite script installed in ${PREFIX}${DEST}/$INIT"
echo "Shorewall6 Lite script installed in ${DESTDIR}${DEST}/$INIT"
#
# Create /etc/shorewall6-lite, /usr/share/shorewall6-lite and /var/lib/shorewall6-lite if needed
#
mkdir -p ${PREFIX}/etc/shorewall6-lite
mkdir -p ${PREFIX}/usr/share/shorewall6-lite
mkdir -p ${PREFIX}/var/lib/shorewall6-lite
mkdir -p ${DESTDIR}/etc/shorewall6-lite
mkdir -p ${DESTDIR}/usr/share/shorewall6-lite
mkdir -p ${DESTDIR}/var/lib/shorewall6-lite
chmod 755 ${PREFIX}/etc/shorewall6-lite
chmod 755 ${PREFIX}/usr/share/shorewall6-lite
chmod 755 ${DESTDIR}/etc/shorewall6-lite
chmod 755 ${DESTDIR}/usr/share/shorewall6-lite
if [ -n "$PREFIX" ]; then
mkdir -p ${PREFIX}/etc/logrotate.d
chmod 755 ${PREFIX}/etc/logrotate.d
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}/etc/logrotate.d
chmod 755 ${DESTDIR}/etc/logrotate.d
fi
#
# Install the config file
#
if [ ! -f ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf ]; then
install_file shorewall6-lite.conf ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf 0744
echo "Config file installed as ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf"
if [ ! -f ${DESTDIR}/etc/shorewall6-lite/shorewall6-lite.conf ]; then
install_file shorewall6-lite.conf ${DESTDIR}/etc/shorewall6-lite/shorewall6-lite.conf 0744
echo "Config file installed as ${DESTDIR}/etc/shorewall6-lite/shorewall6-lite.conf"
fi
if [ -n "$ARCHLINUX" ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall6-lite/shorewall.conf
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/shorewall6-lite/shorewall.conf
fi
#
# Install the Makefile
#
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall6-lite
echo "Makefile installed as ${PREFIX}/etc/shorewall6-lite/Makefile"
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}/etc/shorewall6-lite
echo "Makefile installed as ${DESTDIR}/etc/shorewall6-lite/Makefile"
#
# Install the default config path file
#
install_file configpath ${PREFIX}/usr/share/shorewall6-lite/configpath 0644
echo "Default config path file installed as ${PREFIX}/usr/share/shorewall6-lite/configpath"
install_file configpath ${DESTDIR}/usr/share/shorewall6-lite/configpath 0644
echo "Default config path file installed as ${DESTDIR}/usr/share/shorewall6-lite/configpath"
#
# Install the libraries
#
for f in lib.* ; do
if [ -f $f ]; then
install_file $f ${PREFIX}/usr/share/shorewall6-lite/$f 0644
echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall6-lite/$f"
install_file $f ${DESTDIR}/usr/share/shorewall6-lite/$f 0644
echo "Library ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall6-lite/$f"
fi
done
ln -sf lib.base ${PREFIX}/usr/share/shorewall6-lite/functions
ln -sf lib.base ${DESTDIR}/usr/share/shorewall6-lite/functions
echo "Common functions linked through ${PREFIX}/usr/share/shorewall6-lite/functions"
echo "Common functions linked through ${DESTDIR}/usr/share/shorewall6-lite/functions"
#
# Install Shorecap
#
install_file shorecap ${PREFIX}/usr/share/shorewall6-lite/shorecap 0755
install_file shorecap ${DESTDIR}/usr/share/shorewall6-lite/shorecap 0755
echo
echo "Capability file builder installed in ${PREFIX}/usr/share/shorewall6-lite/shorecap"
echo "Capability file builder installed in ${DESTDIR}/usr/share/shorewall6-lite/shorecap"
#
# Install wait4ifup
#
if [ -f wait4ifup ]; then
install_file wait4ifup ${PREFIX}/usr/share/shorewall6-lite/wait4ifup 0755
install_file wait4ifup ${DESTDIR}/usr/share/shorewall6-lite/wait4ifup 0755
echo
echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall6-lite/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall6-lite/wait4ifup"
fi
if [ -f modules ]; then
#
# Install the Modules file
#
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall6-lite
echo "Modules file installed as ${PREFIX}/usr/share/shorewall6-lite/modules"
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}/usr/share/shorewall6-lite
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall6-lite/modules"
fi
if [ -d manpages ]; then
@ -309,18 +311,18 @@ if [ -d manpages ]; then
cd manpages
[ -n "$INSTALLD" ] || mkdir -p ${PREFIX}/usr/share/man/man5/ ${PREFIX}/usr/share/man/man8/
[ -n "$INSTALLD" ] || mkdir -p ${DESTDIR}/usr/share/man/man5/ ${DESTDIR}/usr/share/man/man8/
for f in *.5; do
gzip -c $f > $f.gz
run_install $INSTALLD -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
echo "Man page $f.gz installed to ${PREFIX}/usr/share/man/man5/$f.gz"
run_install $INSTALLD -m 644 $f.gz ${DESTDIR}/usr/share/man/man5/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}/usr/share/man/man5/$f.gz"
done
for f in *.8; do
gzip -c $f > $f.gz
run_install $INSTALLD -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
echo "Man page $f.gz installed to ${PREFIX}/usr/share/man/man8/$f.gz"
run_install $INSTALLD -m 644 $f.gz ${DESTDIR}/usr/share/man/man8/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}/usr/share/man/man8/$f.gz"
done
cd ..
@ -328,26 +330,26 @@ if [ -d manpages ]; then
echo "Man Pages Installed"
fi
if [ -d ${PREFIX}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall6-lite
echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall6-lite"
if [ -d ${DESTDIR}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}/etc/logrotate.d/shorewall6-lite
echo "Logrotate file installed as ${DESTDIR}/etc/logrotate.d/shorewall6-lite"
fi
#
# Create the version file
#
echo "$VERSION" > ${PREFIX}/usr/share/shorewall6-lite/version
chmod 644 ${PREFIX}/usr/share/shorewall6-lite/version
echo "$VERSION" > ${DESTDIR}/usr/share/shorewall6-lite/version
chmod 644 ${DESTDIR}/usr/share/shorewall6-lite/version
#
# Remove and create the symbolic link to the init script
#
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
rm -f /usr/share/shorewall6-lite/init
ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init
fi
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
touch /var/log/shorewall6-lite-init.log
if [ -n "$first_install" ]; then

View File

@ -85,6 +85,8 @@ install_file() # $1 = source $2 = target $3 = mode
run_install $OWNERSHIP -m $3 $1 ${2}
}
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
#
# Parse the run line
#
@ -116,7 +118,7 @@ INSTALLD='-D'
case $(uname) in
CYGWIN*)
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
fi
@ -127,7 +129,7 @@ case $(uname) in
SPARSE=Yes
;;
Darwin)
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
SPARSE=Yes
@ -172,7 +174,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
# Determine where to install the firewall script
#
if [ -n "$PREFIX" ]; then
if [ -n "$DESTDIR" ]; then
if [ -z "$CYGWIN" ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
@ -180,8 +182,8 @@ if [ -n "$PREFIX" ]; then
fi
fi
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
CYGWIN=
MAC=
@ -221,18 +223,18 @@ echo "Installing Shorewall6 Version $VERSION"
#
# Check for /sbin/shorewall6
#
if [ -f ${PREFIX}/sbin/shorewall6 ]; then
if [ -f ${DESTDIR}/sbin/shorewall6 ]; then
first_install=""
else
first_install="Yes"
fi
if [ -z "$CYGWIN" ]; then
install_file shorewall6 ${PREFIX}/sbin/shorewall6 0755 ${PREFIX}/var/lib/shorewall6-${VERSION}.bkout
echo "shorewall6 control program installed in ${PREFIX}/sbin/shorewall6"
install_file shorewall6 ${DESTDIR}/sbin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout
echo "shorewall6 control program installed in ${DESTDIR}/sbin/shorewall6"
else
install_file shorewall6 ${PREFIX}/bin/shorewall6 0755 ${PREFIX}/var/lib/shorewall6-${VERSION}.bkout
echo "shorewall6 control program installed in ${PREFIX}/bin/shorewall6"
install_file shorewall6 ${DESTDIR}/bin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout
echo "shorewall6 control program installed in ${DESTDIR}/bin/shorewall6"
fi
@ -240,451 +242,451 @@ fi
# Install the Firewall Script
#
if [ -n "$DEBIAN" ]; then
install_file init.debian.sh /etc/init.d/shorewall6 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
install_file init.debian.sh /etc/init.d/shorewall6 0544 ${DESTDIR}/usr/share/shorewall6-${VERSION}.bkout
elif [ -n "$SLACKWARE" ]; then
install_file init.slackware.shorewall6.sh ${PREFIX}${DEST}/rc.shorewall6 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
install_file init.slackware.shorewall6.sh ${DESTDIR}${DEST}/rc.shorewall6 0544 ${DESTDIR}/usr/share/shorewall6-${VERSION}.bkout
elif [ -n "$ARCHLINUX" ]; then
install_file init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544 ${DESTDIR}/usr/share/shorewall6-${VERSION}.bkout
elif [ -n "$INIT" ]; then
install_file init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544 ${DESTDIR}/usr/share/shorewall6-${VERSION}.bkout
fi
[ -n "$INIT" ] && echo "Shorewall6 script installed in ${PREFIX}${DEST}/$INIT"
[ -n "$INIT" ] && echo "Shorewall6 script installed in ${DESTDIR}${DEST}/$INIT"
#
# Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed
#
mkdir -p ${PREFIX}/etc/shorewall6
mkdir -p ${PREFIX}/usr/share/shorewall6
mkdir -p ${PREFIX}/usr/share/shorewall6/configfiles
mkdir -p ${PREFIX}/var/lib/shorewall6
mkdir -p ${DESTDIR}/etc/shorewall6
mkdir -p ${DESTDIR}/usr/share/shorewall6
mkdir -p ${DESTDIR}/usr/share/shorewall6/configfiles
mkdir -p ${DESTDIR}/var/lib/shorewall6
chmod 755 ${PREFIX}/etc/shorewall6
chmod 755 ${PREFIX}/usr/share/shorewall6
chmod 755 ${PREFIX}/usr/share/shorewall6/configfiles
chmod 755 ${DESTDIR}/etc/shorewall6
chmod 755 ${DESTDIR}/usr/share/shorewall6
chmod 755 ${DESTDIR}/usr/share/shorewall6/configfiles
if [ -n "$PREFIX" ]; then
mkdir -p ${PREFIX}/etc/logrotate.d
chmod 755 ${PREFIX}/etc/logrotate.d
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}/etc/logrotate.d
chmod 755 ${DESTDIR}/etc/logrotate.d
fi
#
# Install the config file
#
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
run_install $OWNERSHIP -m 0644 shorewall6.conf ${DESTDIR}/usr/share/shorewall6/configfiles/shorewall6.conf
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall6/configfiles:/usr/share/shorewall6|;' ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall6-lite-init.log|;' ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall6/configfiles:/usr/share/shorewall6|;' ${DESTDIR}/usr/share/shorewall6/configfiles/shorewall6.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall6-lite-init.log|;' ${DESTDIR}/usr/share/shorewall6/configfiles/shorewall6.conf
if [ ! -f ${PREFIX}/etc/shorewall6/shorewall6.conf ]; then
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/etc/shorewall6/shorewall6.conf
if [ ! -f ${DESTDIR}/etc/shorewall6/shorewall6.conf ]; then
run_install $OWNERSHIP -m 0644 shorewall6.conf ${DESTDIR}/etc/shorewall6/shorewall6.conf
if [ -n "$DEBIAN" ] && mywhich perl; then
#
# Make a Debian-like shorewall6.conf
#
perl -p -w -i -e 's|^STARTUP_ENABLED=.*|STARTUP_ENABLED=Yes|;' ${PREFIX}/etc/shorewall6/shorewall6.conf
perl -p -w -i -e 's|^STARTUP_ENABLED=.*|STARTUP_ENABLED=Yes|;' ${DESTDIR}/etc/shorewall6/shorewall6.conf
fi
echo "Config file installed as ${PREFIX}/etc/shorewall6/shorewall6.conf"
echo "Config file installed as ${DESTDIR}/etc/shorewall6/shorewall6.conf"
fi
if [ -n "$ARCHLINUX" ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall6/shorewall6.conf
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/shorewall6/shorewall6.conf
fi
#
# Install the zones file
#
run_install $OWNERSHIP -m 0644 zones ${PREFIX}/usr/share/shorewall6/configfiles/zones
run_install $OWNERSHIP -m 0644 zones ${DESTDIR}/usr/share/shorewall6/configfiles/zones
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/zones ]; then
run_install $OWNERSHIP -m 0744 zones ${PREFIX}/etc/shorewall6/zones
echo "Zones file installed as ${PREFIX}/etc/shorewall6/zones"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/zones ]; then
run_install $OWNERSHIP -m 0744 zones ${DESTDIR}/etc/shorewall6/zones
echo "Zones file installed as ${DESTDIR}/etc/shorewall6/zones"
fi
delete_file ${PREFIX}/usr/share/shorewall6/compiler
delete_file ${PREFIX}/usr/share/shorewall6/lib.accounting
delete_file ${PREFIX}/usr/share/shorewall6/lib.actions
delete_file ${PREFIX}/usr/share/shorewall6/lib.dynamiczones
delete_file ${PREFIX}/usr/share/shorewall6/lib.maclist
delete_file ${PREFIX}/usr/share/shorewall6/lib.nat
delete_file ${PREFIX}/usr/share/shorewall6/lib.providers
delete_file ${PREFIX}/usr/share/shorewall6/lib.proxyarp
delete_file ${PREFIX}/usr/share/shorewall6/lib.tc
delete_file ${PREFIX}/usr/share/shorewall6/lib.tcrules
delete_file ${PREFIX}/usr/share/shorewall6/lib.tunnels
delete_file ${PREFIX}/usr/share/shorewall6/prog.header
delete_file ${PREFIX}/usr/share/shorewall6/prog.footer
delete_file ${DESTDIR}/usr/share/shorewall6/compiler
delete_file ${DESTDIR}/usr/share/shorewall6/lib.accounting
delete_file ${DESTDIR}/usr/share/shorewall6/lib.actions
delete_file ${DESTDIR}/usr/share/shorewall6/lib.dynamiczones
delete_file ${DESTDIR}/usr/share/shorewall6/lib.maclist
delete_file ${DESTDIR}/usr/share/shorewall6/lib.nat
delete_file ${DESTDIR}/usr/share/shorewall6/lib.providers
delete_file ${DESTDIR}/usr/share/shorewall6/lib.proxyarp
delete_file ${DESTDIR}/usr/share/shorewall6/lib.tc
delete_file ${DESTDIR}/usr/share/shorewall6/lib.tcrules
delete_file ${DESTDIR}/usr/share/shorewall6/lib.tunnels
delete_file ${DESTDIR}/usr/share/shorewall6/prog.header
delete_file ${DESTDIR}/usr/share/shorewall6/prog.footer
#
# Install wait4ifup
#
install_file wait4ifup ${PREFIX}/usr/share/shorewall6/wait4ifup 0755
install_file wait4ifup ${DESTDIR}/usr/share/shorewall6/wait4ifup 0755
echo
echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall6/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall6/wait4ifup"
#
# Install the policy file
#
run_install $OWNERSHIP -m 0644 policy ${PREFIX}/usr/share/shorewall6/configfiles/policy
run_install $OWNERSHIP -m 0644 policy ${DESTDIR}/usr/share/shorewall6/configfiles/policy
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/policy ]; then
run_install $OWNERSHIP -m 0600 policy ${PREFIX}/etc/shorewall6/policy
echo "Policy file installed as ${PREFIX}/etc/shorewall6/policy"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/policy ]; then
run_install $OWNERSHIP -m 0600 policy ${DESTDIR}/etc/shorewall6/policy
echo "Policy file installed as ${DESTDIR}/etc/shorewall6/policy"
fi
#
# Install the interfaces file
#
run_install $OWNERSHIP -m 0644 interfaces ${PREFIX}/usr/share/shorewall6/configfiles/interfaces
run_install $OWNERSHIP -m 0644 interfaces ${DESTDIR}/usr/share/shorewall6/configfiles/interfaces
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/interfaces ]; then
run_install $OWNERSHIP -m 0600 interfaces ${PREFIX}/etc/shorewall6/interfaces
echo "Interfaces file installed as ${PREFIX}/etc/shorewall6/interfaces"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/interfaces ]; then
run_install $OWNERSHIP -m 0600 interfaces ${DESTDIR}/etc/shorewall6/interfaces
echo "Interfaces file installed as ${DESTDIR}/etc/shorewall6/interfaces"
fi
#
# Install the hosts file
#
run_install $OWNERSHIP -m 0644 hosts ${PREFIX}/usr/share/shorewall6/configfiles/hosts
run_install $OWNERSHIP -m 0644 hosts ${DESTDIR}/usr/share/shorewall6/configfiles/hosts
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/hosts ]; then
run_install $OWNERSHIP -m 0600 hosts ${PREFIX}/etc/shorewall6/hosts
echo "Hosts file installed as ${PREFIX}/etc/shorewall6/hosts"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/hosts ]; then
run_install $OWNERSHIP -m 0600 hosts ${DESTDIR}/etc/shorewall6/hosts
echo "Hosts file installed as ${DESTDIR}/etc/shorewall6/hosts"
fi
#
# Install the rules file
#
run_install $OWNERSHIP -m 0644 rules ${PREFIX}/usr/share/shorewall6/configfiles/rules
run_install $OWNERSHIP -m 0644 rules ${DESTDIR}/usr/share/shorewall6/configfiles/rules
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/rules ]; then
run_install $OWNERSHIP -m 0600 rules ${PREFIX}/etc/shorewall6/rules
echo "Rules file installed as ${PREFIX}/etc/shorewall6/rules"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/rules ]; then
run_install $OWNERSHIP -m 0600 rules ${DESTDIR}/etc/shorewall6/rules
echo "Rules file installed as ${DESTDIR}/etc/shorewall6/rules"
fi
#
# Install the Parameters file
#
run_install $OWNERSHIP -m 0644 params ${PREFIX}/usr/share/shorewall6/configfiles/params
run_install $OWNERSHIP -m 0644 params ${DESTDIR}/usr/share/shorewall6/configfiles/params
if [ -f ${PREFIX}/etc/shorewall6/params ]; then
chmod 0644 ${PREFIX}/etc/shorewall6/params
if [ -f ${DESTDIR}/etc/shorewall6/params ]; then
chmod 0644 ${DESTDIR}/etc/shorewall6/params
else
run_install $OWNERSHIP -m 0644 params ${PREFIX}/etc/shorewall6/params
echo "Parameter file installed as ${PREFIX}/etc/shorewall6/params"
run_install $OWNERSHIP -m 0644 params ${DESTDIR}/etc/shorewall6/params
echo "Parameter file installed as ${DESTDIR}/etc/shorewall6/params"
fi
#
# Install the Stopped Routing file
#
run_install $OWNERSHIP -m 0644 routestopped ${PREFIX}/usr/share/shorewall6/configfiles/routestopped
run_install $OWNERSHIP -m 0644 routestopped ${DESTDIR}/usr/share/shorewall6/configfiles/routestopped
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/routestopped ]; then
run_install $OWNERSHIP -m 0600 routestopped ${PREFIX}/etc/shorewall6/routestopped
echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall6/routestopped"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/routestopped ]; then
run_install $OWNERSHIP -m 0600 routestopped ${DESTDIR}/etc/shorewall6/routestopped
echo "Stopped Routing file installed as ${DESTDIR}/etc/shorewall6/routestopped"
fi
#
# Install the Mac List file
#
run_install $OWNERSHIP -m 0644 maclist ${PREFIX}/usr/share/shorewall6/configfiles/maclist
run_install $OWNERSHIP -m 0644 maclist ${DESTDIR}/usr/share/shorewall6/configfiles/maclist
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/maclist ]; then
run_install $OWNERSHIP -m 0600 maclist ${PREFIX}/etc/shorewall6/maclist
echo "MAC list file installed as ${PREFIX}/etc/shorewall6/maclist"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/maclist ]; then
run_install $OWNERSHIP -m 0600 maclist ${DESTDIR}/etc/shorewall6/maclist
echo "MAC list file installed as ${DESTDIR}/etc/shorewall6/maclist"
fi
#
# Install the Modules file
#
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall6/modules
echo "Modules file installed as ${PREFIX}/usr/share/shorewall6/modules"
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}/usr/share/shorewall6/modules
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall6/modules"
#
# Install the Module Helpers file
#
run_install $OWNERSHIP -m 0600 helpers ${PREFIX}/usr/share/shorewall6/helpers
echo "Helper modules file installed as ${PREFIX}/usr/share/shorewall6/helpers"
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}/usr/share/shorewall6/helpers
echo "Helper modules file installed as ${DESTDIR}/usr/share/shorewall6/helpers"
#
# Install the TC Rules file
#
run_install $OWNERSHIP -m 0644 tcrules ${PREFIX}/usr/share/shorewall6/configfiles/tcrules
run_install $OWNERSHIP -m 0644 tcrules ${DESTDIR}/usr/share/shorewall6/configfiles/tcrules
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tcrules ]; then
run_install $OWNERSHIP -m 0600 tcrules ${PREFIX}/etc/shorewall6/tcrules
echo "TC Rules file installed as ${PREFIX}/etc/shorewall6/tcrules"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tcrules ]; then
run_install $OWNERSHIP -m 0600 tcrules ${DESTDIR}/etc/shorewall6/tcrules
echo "TC Rules file installed as ${DESTDIR}/etc/shorewall6/tcrules"
fi
#
# Install the TC Interfaces file
#
run_install $OWNERSHIP -m 0644 tcinterfaces ${PREFIX}/usr/share/shorewall6/configfiles/tcinterfaces
run_install $OWNERSHIP -m 0644 tcinterfaces ${DESTDIR}/usr/share/shorewall6/configfiles/tcinterfaces
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tcinterfaces ]; then
run_install $OWNERSHIP -m 0600 tcinterfaces ${PREFIX}/etc/shorewall6/tcinterfaces
echo "TC Interfaces file installed as ${PREFIX}/etc/shorewall6/tcinterfaces"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tcinterfaces ]; then
run_install $OWNERSHIP -m 0600 tcinterfaces ${DESTDIR}/etc/shorewall6/tcinterfaces
echo "TC Interfaces file installed as ${DESTDIR}/etc/shorewall6/tcinterfaces"
fi
#
# Install the TC Priority file
#
run_install $OWNERSHIP -m 0644 tcpri ${PREFIX}/usr/share/shorewall6/configfiles/tcpri
run_install $OWNERSHIP -m 0644 tcpri ${DESTDIR}/usr/share/shorewall6/configfiles/tcpri
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tcpri ]; then
run_install $OWNERSHIP -m 0600 tcpri ${PREFIX}/etc/shorewall6/tcpri
echo "TC Priority file installed as ${PREFIX}/etc/shorewall6/tcpri"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tcpri ]; then
run_install $OWNERSHIP -m 0600 tcpri ${DESTDIR}/etc/shorewall6/tcpri
echo "TC Priority file installed as ${DESTDIR}/etc/shorewall6/tcpri"
fi
#
# Install the TOS file
#
run_install $OWNERSHIP -m 0644 tos ${PREFIX}/usr/share/shorewall6/configfiles/tos
run_install $OWNERSHIP -m 0644 tos ${DESTDIR}/usr/share/shorewall6/configfiles/tos
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tos ]; then
run_install $OWNERSHIP -m 0600 tos ${PREFIX}/etc/shorewall6/tos
echo "TOS file installed as ${PREFIX}/etc/shorewall6/tos"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tos ]; then
run_install $OWNERSHIP -m 0600 tos ${DESTDIR}/etc/shorewall6/tos
echo "TOS file installed as ${DESTDIR}/etc/shorewall6/tos"
fi
#
# Install the Tunnels file
#
run_install $OWNERSHIP -m 0644 tunnels ${PREFIX}/usr/share/shorewall6/configfiles/tunnels
run_install $OWNERSHIP -m 0644 tunnels ${DESTDIR}/usr/share/shorewall6/configfiles/tunnels
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tunnels ]; then
run_install $OWNERSHIP -m 0600 tunnels ${PREFIX}/etc/shorewall6/tunnels
echo "Tunnels file installed as ${PREFIX}/etc/shorewall6/tunnels"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tunnels ]; then
run_install $OWNERSHIP -m 0600 tunnels ${DESTDIR}/etc/shorewall6/tunnels
echo "Tunnels file installed as ${DESTDIR}/etc/shorewall6/tunnels"
fi
#
# Install the blacklist file
#
run_install $OWNERSHIP -m 0644 blacklist ${PREFIX}/usr/share/shorewall6/configfiles/blacklist
run_install $OWNERSHIP -m 0644 blacklist ${DESTDIR}/usr/share/shorewall6/configfiles/blacklist
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/blacklist ]; then
run_install $OWNERSHIP -m 0600 blacklist ${PREFIX}/etc/shorewall6/blacklist
echo "Blacklist file installed as ${PREFIX}/etc/shorewall6/blacklist"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/blacklist ]; then
run_install $OWNERSHIP -m 0600 blacklist ${DESTDIR}/etc/shorewall6/blacklist
echo "Blacklist file installed as ${DESTDIR}/etc/shorewall6/blacklist"
fi
#
# Install the Providers file
#
run_install $OWNERSHIP -m 0644 providers ${PREFIX}/usr/share/shorewall6/configfiles/providers
run_install $OWNERSHIP -m 0644 providers ${DESTDIR}/usr/share/shorewall6/configfiles/providers
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/providers ]; then
run_install $OWNERSHIP -m 0600 providers ${PREFIX}/etc/shorewall6/providers
echo "Providers file installed as ${PREFIX}/etc/shorewall6/providers"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/providers ]; then
run_install $OWNERSHIP -m 0600 providers ${DESTDIR}/etc/shorewall6/providers
echo "Providers file installed as ${DESTDIR}/etc/shorewall6/providers"
fi
#
# Install the Route Rules file
#
run_install $OWNERSHIP -m 0644 route_rules ${PREFIX}/usr/share/shorewall6/configfiles/route_rules
run_install $OWNERSHIP -m 0644 route_rules ${DESTDIR}/usr/share/shorewall6/configfiles/route_rules
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/route_rules ]; then
run_install $OWNERSHIP -m 0600 route_rules ${PREFIX}/etc/shorewall6/route_rules
echo "Routing rules file installed as ${PREFIX}/etc/shorewall6/route_rules"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/route_rules ]; then
run_install $OWNERSHIP -m 0600 route_rules ${DESTDIR}/etc/shorewall6/route_rules
echo "Routing rules file installed as ${DESTDIR}/etc/shorewall6/route_rules"
fi
#
# Install the tcclasses file
#
run_install $OWNERSHIP -m 0644 tcclasses ${PREFIX}/usr/share/shorewall6/configfiles/tcclasses
run_install $OWNERSHIP -m 0644 tcclasses ${DESTDIR}/usr/share/shorewall6/configfiles/tcclasses
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tcclasses ]; then
run_install $OWNERSHIP -m 0600 tcclasses ${PREFIX}/etc/shorewall6/tcclasses
echo "TC Classes file installed as ${PREFIX}/etc/shorewall6/tcclasses"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tcclasses ]; then
run_install $OWNERSHIP -m 0600 tcclasses ${DESTDIR}/etc/shorewall6/tcclasses
echo "TC Classes file installed as ${DESTDIR}/etc/shorewall6/tcclasses"
fi
#
# Install the tcdevices file
#
run_install $OWNERSHIP -m 0644 tcdevices ${PREFIX}/usr/share/shorewall6/configfiles/tcdevices
run_install $OWNERSHIP -m 0644 tcdevices ${DESTDIR}/usr/share/shorewall6/configfiles/tcdevices
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tcdevices ]; then
run_install $OWNERSHIP -m 0600 tcdevices ${PREFIX}/etc/shorewall6/tcdevices
echo "TC Devices file installed as ${PREFIX}/etc/shorewall6/tcdevices"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tcdevices ]; then
run_install $OWNERSHIP -m 0600 tcdevices ${DESTDIR}/etc/shorewall6/tcdevices
echo "TC Devices file installed as ${DESTDIR}/etc/shorewall6/tcdevices"
fi
#
# Install the Notrack file
#
run_install $OWNERSHIP -m 0644 notrack ${PREFIX}/usr/share/shorewall6/configfiles/notrack
run_install $OWNERSHIP -m 0644 notrack ${DESTDIR}/usr/share/shorewall6/configfiles/notrack
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/notrack ]; then
run_install $OWNERSHIP -m 0600 notrack ${PREFIX}/etc/shorewall6/notrack
echo "Notrack file installed as ${PREFIX}/etc/shorewall6/notrack"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/notrack ]; then
run_install $OWNERSHIP -m 0600 notrack ${DESTDIR}/etc/shorewall6/notrack
echo "Notrack file installed as ${DESTDIR}/etc/shorewall6/notrack"
fi
#
# Install the default config path file
#
install_file configpath ${PREFIX}/usr/share/shorewall6/configpath 0644
echo "Default config path file installed as ${PREFIX}/usr/share/shorewall6/configpath"
install_file configpath ${DESTDIR}/usr/share/shorewall6/configpath 0644
echo "Default config path file installed as ${DESTDIR}/usr/share/shorewall6/configpath"
#
# Install the init file
#
run_install $OWNERSHIP -m 0644 init ${PREFIX}/usr/share/shorewall6/configfiles/init
run_install $OWNERSHIP -m 0644 init ${DESTDIR}/usr/share/shorewall6/configfiles/init
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/init ]; then
run_install $OWNERSHIP -m 0600 init ${PREFIX}/etc/shorewall6/init
echo "Init file installed as ${PREFIX}/etc/shorewall6/init"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/init ]; then
run_install $OWNERSHIP -m 0600 init ${DESTDIR}/etc/shorewall6/init
echo "Init file installed as ${DESTDIR}/etc/shorewall6/init"
fi
#
# Install the start file
#
run_install $OWNERSHIP -m 0644 start ${PREFIX}/usr/share/shorewall6/configfiles/start
run_install $OWNERSHIP -m 0644 start ${DESTDIR}/usr/share/shorewall6/configfiles/start
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/start ]; then
run_install $OWNERSHIP -m 0600 start ${PREFIX}/etc/shorewall6/start
echo "Start file installed as ${PREFIX}/etc/shorewall6/start"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/start ]; then
run_install $OWNERSHIP -m 0600 start ${DESTDIR}/etc/shorewall6/start
echo "Start file installed as ${DESTDIR}/etc/shorewall6/start"
fi
#
# Install the stop file
#
run_install $OWNERSHIP -m 0644 stop ${PREFIX}/usr/share/shorewall6/configfiles/stop
run_install $OWNERSHIP -m 0644 stop ${DESTDIR}/usr/share/shorewall6/configfiles/stop
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/stop ]; then
run_install $OWNERSHIP -m 0600 stop ${PREFIX}/etc/shorewall6/stop
echo "Stop file installed as ${PREFIX}/etc/shorewall6/stop"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/stop ]; then
run_install $OWNERSHIP -m 0600 stop ${DESTDIR}/etc/shorewall6/stop
echo "Stop file installed as ${DESTDIR}/etc/shorewall6/stop"
fi
#
# Install the stopped file
#
run_install $OWNERSHIP -m 0644 stopped ${PREFIX}/usr/share/shorewall6/configfiles/stopped
run_install $OWNERSHIP -m 0644 stopped ${DESTDIR}/usr/share/shorewall6/configfiles/stopped
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/stopped ]; then
run_install $OWNERSHIP -m 0600 stopped ${PREFIX}/etc/shorewall6/stopped
echo "Stopped file installed as ${PREFIX}/etc/shorewall6/stopped"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/stopped ]; then
run_install $OWNERSHIP -m 0600 stopped ${DESTDIR}/etc/shorewall6/stopped
echo "Stopped file installed as ${DESTDIR}/etc/shorewall6/stopped"
fi
#
# Install the Accounting file
#
run_install $OWNERSHIP -m 0644 accounting ${PREFIX}/usr/share/shorewall6/configfiles/accounting
run_install $OWNERSHIP -m 0644 accounting ${DESTDIR}/usr/share/shorewall6/configfiles/accounting
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/accounting ]; then
run_install $OWNERSHIP -m 0600 accounting ${PREFIX}/etc/shorewall6/accounting
echo "Accounting file installed as ${PREFIX}/etc/shorewall6/accounting"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/accounting ]; then
run_install $OWNERSHIP -m 0600 accounting ${DESTDIR}/etc/shorewall6/accounting
echo "Accounting file installed as ${DESTDIR}/etc/shorewall6/accounting"
fi
#
# Install the Started file
#
run_install $OWNERSHIP -m 0644 started ${PREFIX}/usr/share/shorewall6/configfiles/started
run_install $OWNERSHIP -m 0644 started ${DESTDIR}/usr/share/shorewall6/configfiles/started
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/started ]; then
run_install $OWNERSHIP -m 0600 started ${PREFIX}/etc/shorewall6/started
echo "Started file installed as ${PREFIX}/etc/shorewall6/started"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/started ]; then
run_install $OWNERSHIP -m 0600 started ${DESTDIR}/etc/shorewall6/started
echo "Started file installed as ${DESTDIR}/etc/shorewall6/started"
fi
#
# Install the Restored file
#
run_install $OWNERSHIP -m 0644 restored ${PREFIX}/usr/share/shorewall6/configfiles/restored
run_install $OWNERSHIP -m 0644 restored ${DESTDIR}/usr/share/shorewall6/configfiles/restored
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/restored ]; then
run_install $OWNERSHIP -m 0600 restored ${PREFIX}/etc/shorewall6/restored
echo "Restored file installed as ${PREFIX}/etc/shorewall6/restored"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/restored ]; then
run_install $OWNERSHIP -m 0600 restored ${DESTDIR}/etc/shorewall6/restored
echo "Restored file installed as ${DESTDIR}/etc/shorewall6/restored"
fi
#
# Install the Clear file
#
run_install $OWNERSHIP -m 0644 clear ${PREFIX}/usr/share/shorewall6/configfiles/clear
run_install $OWNERSHIP -m 0644 clear ${DESTDIR}/usr/share/shorewall6/configfiles/clear
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/clear ]; then
run_install $OWNERSHIP -m 0600 clear ${PREFIX}/etc/shorewall6/clear
echo "Clear file installed as ${PREFIX}/etc/shorewall6/clear"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/clear ]; then
run_install $OWNERSHIP -m 0600 clear ${DESTDIR}/etc/shorewall6/clear
echo "Clear file installed as ${DESTDIR}/etc/shorewall6/clear"
fi
#
# Install the Isusable file
#
run_install $OWNERSHIP -m 0644 isusable ${PREFIX}/usr/share/shorewall6/configfiles/isusable
run_install $OWNERSHIP -m 0644 isusable ${DESTDIR}/usr/share/shorewall6/configfiles/isusable
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/isusable ]; then
run_install $OWNERSHIP -m 0600 isusable ${PREFIX}/etc/shorewall6/isusable
echo "Isusable file installed as ${PREFIX}/etc/shorewall/isusable"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/isusable ]; then
run_install $OWNERSHIP -m 0600 isusable ${DESTDIR}/etc/shorewall6/isusable
echo "Isusable file installed as ${DESTDIR}/etc/shorewall/isusable"
fi
#
# Install the Refresh file
#
run_install $OWNERSHIP -m 0644 refresh ${PREFIX}/usr/share/shorewall6/configfiles/refresh
run_install $OWNERSHIP -m 0644 refresh ${DESTDIR}/usr/share/shorewall6/configfiles/refresh
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/refresh ]; then
run_install $OWNERSHIP -m 0600 refresh ${PREFIX}/etc/shorewall6/refresh
echo "Refresh file installed as ${PREFIX}/etc/shorewall6/refresh"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/refresh ]; then
run_install $OWNERSHIP -m 0600 refresh ${DESTDIR}/etc/shorewall6/refresh
echo "Refresh file installed as ${DESTDIR}/etc/shorewall6/refresh"
fi
#
# Install the Refreshed file
#
run_install $OWNERSHIP -m 0644 refreshed ${PREFIX}/usr/share/shorewall6/configfiles/refreshed
run_install $OWNERSHIP -m 0644 refreshed ${DESTDIR}/usr/share/shorewall6/configfiles/refreshed
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/refreshed ]; then
run_install $OWNERSHIP -m 0600 refreshed ${PREFIX}/etc/shorewall6/refreshed
echo "Refreshed file installed as ${PREFIX}/etc/shorewall6/refreshed"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/refreshed ]; then
run_install $OWNERSHIP -m 0600 refreshed ${DESTDIR}/etc/shorewall6/refreshed
echo "Refreshed file installed as ${DESTDIR}/etc/shorewall6/refreshed"
fi
#
# Install the Tcclear file
#
run_install $OWNERSHIP -m 0644 tcclear ${PREFIX}/usr/share/shorewall6/configfiles/tcclear
run_install $OWNERSHIP -m 0644 tcclear ${DESTDIR}/usr/share/shorewall6/configfiles/tcclear
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/tcclear ]; then
run_install $OWNERSHIP -m 0600 tcclear ${PREFIX}/etc/shorewall6/tcclear
echo "Tcclear file installed as ${PREFIX}/etc/shorewall6/tcclear"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/tcclear ]; then
run_install $OWNERSHIP -m 0600 tcclear ${DESTDIR}/etc/shorewall6/tcclear
echo "Tcclear file installed as ${DESTDIR}/etc/shorewall6/tcclear"
fi
#
# Install the Standard Actions file
#
install_file actions.std ${PREFIX}/usr/share/shorewall6/actions.std 0644
echo "Standard actions file installed as ${PREFIX}/usr/shared/shorewall6/actions.std"
install_file actions.std ${DESTDIR}/usr/share/shorewall6/actions.std 0644
echo "Standard actions file installed as ${DESTDIR}/usr/shared/shorewall6/actions.std"
#
# Install the Actions file
#
run_install $OWNERSHIP -m 0644 actions ${PREFIX}/usr/share/shorewall6/configfiles/actions
run_install $OWNERSHIP -m 0644 actions ${DESTDIR}/usr/share/shorewall6/configfiles/actions
if [ -z "$SPARSE" -a ! -f ${PREFIX}/etc/shorewall6/actions ]; then
run_install $OWNERSHIP -m 0644 actions ${PREFIX}/etc/shorewall6/actions
echo "Actions file installed as ${PREFIX}/etc/shorewall6/actions"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall6/actions ]; then
run_install $OWNERSHIP -m 0644 actions ${DESTDIR}/etc/shorewall6/actions
echo "Actions file installed as ${DESTDIR}/etc/shorewall6/actions"
fi
#
# Install the Makefiles
#
run_install $OWNERSHIP -m 0644 Makefile-lite ${PREFIX}/usr/share/shorewall6/configfiles/Makefile
run_install $OWNERSHIP -m 0644 Makefile-lite ${DESTDIR}/usr/share/shorewall6/configfiles/Makefile
if [ -z "$SPARSE" ]; then
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall6/Makefile
echo "Makefile installed as ${PREFIX}/etc/shorewall6/Makefile"
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}/etc/shorewall6/Makefile
echo "Makefile installed as ${DESTDIR}/etc/shorewall6/Makefile"
fi
#
# Install the Action files
#
for f in action.* ; do
install_file $f ${PREFIX}/usr/share/shorewall6/$f 0644
echo "Action ${f#*.} file installed as ${PREFIX}/usr/share/shorewall6/$f"
install_file $f ${DESTDIR}/usr/share/shorewall6/$f 0644
echo "Action ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall6/$f"
done
# Install the Macro files
#
for f in macro.* ; do
install_file $f ${PREFIX}/usr/share/shorewall6/$f 0644
echo "Macro ${f#*.} file installed as ${PREFIX}/usr/share/shorewall6/$f"
install_file $f ${DESTDIR}/usr/share/shorewall6/$f 0644
echo "Macro ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall6/$f"
done
#
# Install the libraries
#
for f in lib.* ; do
if [ -f $f ]; then
install_file $f ${PREFIX}/usr/share/shorewall6/$f 0644
echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall6/$f"
install_file $f ${DESTDIR}/usr/share/shorewall6/$f 0644
echo "Library ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall6/$f"
fi
done
#
# Symbolically link 'functions' to lib.base
#
ln -sf lib.base ${PREFIX}/usr/share/shorewall6/functions
ln -sf lib.base ${DESTDIR}/usr/share/shorewall6/functions
#
# Create the version file
#
echo "$VERSION" > ${PREFIX}/usr/share/shorewall6/version
chmod 644 ${PREFIX}/usr/share/shorewall6/version
echo "$VERSION" > ${DESTDIR}/usr/share/shorewall6/version
chmod 644 ${DESTDIR}/usr/share/shorewall6/version
#
# Remove and create the symbolic link to the init script
#
if [ -z "$PREFIX" ]; then
if [ -z "$DESTDIR" ]; then
rm -f /usr/share/shorewall6/init
ln -s ${DEST}/${INIT} /usr/share/shorewall6/init
fi
@ -695,30 +697,30 @@ fi
cd manpages
[ -n "$INSTALLD" ] || mkdir -p ${PREFIX}${MANDIR}/man5/ ${PREFIX}${MANDIR}/man8/
[ -n "$INSTALLD" ] || mkdir -p ${DESTDIR}${MANDIR}/man5/ ${DESTDIR}${MANDIR}/man8/
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"
run_install $INSTALLD -m 0644 $f.gz ${DESTDIR}${MANDIR}/man5/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man5/$f.gz"
done
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"
run_install $INSTALLD -m 0644 $f.gz ${DESTDIR}${MANDIR}/man8/$f.gz
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man8/$f.gz"
done
cd ..
echo "Man Pages Installed"
if [ -d ${PREFIX}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall6
echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall6"
if [ -d ${DESTDIR}/etc/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}/etc/logrotate.d/shorewall6
echo "Logrotate file installed as ${DESTDIR}/etc/logrotate.d/shorewall6"
fi
if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6
ln -s ../init.d/shorewall6 /etc/rcS.d/S40shorewall6