Correct Shorewall-init installer handling of SANDBOX

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2014-10-04 09:00:12 -07:00
parent 00b0489047
commit 70bb9147cd
2 changed files with 32 additions and 8 deletions

View File

@ -376,6 +376,9 @@ if [ $HOST = debian ]; then
if [ -n "${DESTDIR}" ]; then if [ -n "${DESTDIR}" ]; then
mkdir -p ${DESTDIR}/etc/network/if-up.d/ mkdir -p ${DESTDIR}/etc/network/if-up.d/
mkdir -p ${DESTDIR}/etc/network/if-down.d/ mkdir -p ${DESTDIR}/etc/network/if-down.d/
elif [ $configure -eq 0 ]; then
mkdir -p ${DESTDIR}/${CONFDIR}/network/if-up.d/
mkdir -p ${DESTDIR}/${CONFDIR}/network/if-down.d/
fi fi
if [ ! -f ${DESTDIR}/etc/default/shorewall-init ]; then if [ ! -f ${DESTDIR}/etc/default/shorewall-init ]; then
@ -383,7 +386,11 @@ if [ $HOST = debian ]; then
mkdir ${DESTDIR}/etc/default mkdir ${DESTDIR}/etc/default
fi fi
install_file sysconfig ${DESTDIR}/etc/default/shorewall-init 0644 if [ $configure -eq 1 ]; then
install_file sysconfig ${DESTDIR}/etc/default/shorewall-init 0644
else
install_file sysconfig ${DESTDIR}${CONFDIR}/default/shorewall-init 0644
fi
fi fi
IFUPDOWN=ifupdown.debian.sh IFUPDOWN=ifupdown.debian.sh
@ -394,7 +401,7 @@ else
if [ -z "$RPM" ]; then if [ -z "$RPM" ]; then
if [ $HOST = suse ]; then if [ $HOST = suse ]; then
mkdir -p ${DESTDIR}/etc/sysconfig/network/if-up.d mkdir -p ${DESTDIR}/etc/sysconfig/network/if-up.d
mkdir -p ${DESTDIR}${SYSCONFDIR}/network/if-down.d mkdir -p ${DESTDIR}/etc/sysconfig/network/if-down.d
elif [ $HOST = gentoo ]; then elif [ $HOST = gentoo ]; then
# Gentoo does not support if-{up,down}.d # Gentoo does not support if-{up,down}.d
/bin/true /bin/true
@ -425,17 +432,35 @@ mkdir -p ${DESTDIR}${LIBEXECDIR}/shorewall-init
install_file ifupdown ${DESTDIR}${LIBEXECDIR}/shorewall-init/ifupdown 0544 install_file ifupdown ${DESTDIR}${LIBEXECDIR}/shorewall-init/ifupdown 0544
if [ -d ${DESTDIR}/etc/NetworkManager ]; then if [ -d ${DESTDIR}/etc/NetworkManager ]; then
install_file ifupdown ${DESTDIR}/etc/NetworkManager/dispatcher.d/01-shorewall 0544 if [ $configure -eq 1 ]; then
install_file ifupdown ${DESTDIR}/etc/NetworkManager/dispatcher.d/01-shorewall 0544
else
mkdir -p ${DESTDIR}${CONFIGDIR}/NetworkManager/dispatcher.d/
install_file ifupdown ${DESTDIR}${CONFIGDIR}/NetworkManager/dispatcher.d/01-shorewall 0544
fi
fi fi
case $HOST in case $HOST in
debian) debian)
install_file ifupdown ${DESTDIR}/etc/network/if-up.d/shorewall 0544 if [ $configure -eq 1 ]; then
install_file ifupdown ${DESTDIR}/etc/network/if-down.d/shorewall 0544 install_file ifupdown ${DESTDIR}/etc/network/if-up.d/shorewall 0544
install_file ifupdown ${DESTDIR}/etc/network/if-post-down.d/shorewall 0544 install_file ifupdown ${DESTDIR}/etc/network/if-down.d/shorewall 0544
install_file ifupdown ${DESTDIR}/etc/network/if-post-down.d/shorewall 0544
else
mkdir -p ${DESTDIR}${CONFIGDIR}/network/if-up.d/
mkdir -p ${DESTDIR}${CONFIGDIR}/network/if-down.d/
install_file ifupdown ${DESTDIR}${CONFIGDIR}/network/if-up.d/shorewall 0544
install_file ifupdown ${DESTDIR}${CONFIGDIR}/network/if-down.d/shorewall 0544
install_file ifupdown ${DESTDIR}${CONFIGDIR}/network/if-post-down.d/shorewall 0544
fi
;; ;;
suse) suse)
if [ -z "$RPM" ]; then if [ -z "$RPM" ]; then
if [ $configure -eq 0 ]; then
mkdir -p ${DESTDIR}${SYSCONFDIR}/network/if-up.d/
mkdir -p ${DESTDIR}${SYSCONFDIR}/network/if-down.d/
fi
install_file ifupdown ${DESTDIR}${SYSCONFDIR}/network/if-up.d/shorewall 0544 install_file ifupdown ${DESTDIR}${SYSCONFDIR}/network/if-up.d/shorewall 0544
install_file ifupdown ${DESTDIR}${SYSCONFDIR}/network/if-down.d/shorewall 0544 install_file ifupdown ${DESTDIR}${SYSCONFDIR}/network/if-down.d/shorewall 0544
fi fi

View File

@ -1,4 +1,4 @@
\#!/bin/sh #!/bin/sh
# #
# Script to back uninstall Shoreline Firewall # Script to back uninstall Shoreline Firewall
# #
@ -88,7 +88,6 @@ while [ $finished -eq 0 ]; do
echo "$Product Firewall Installer Version $VERSION" echo "$Product Firewall Installer Version $VERSION"
exit 0 exit 0
;; ;;
;;
n*) n*)
configure=0 configure=0
option=${option#n} option=${option#n}