Merge branch '4.5.0'

This commit is contained in:
Tom Eastep 2012-02-17 13:39:22 -08:00
commit 8a3f1f7111
5 changed files with 349 additions and 204 deletions

View File

@ -263,6 +263,15 @@ for f in lib.* ; do
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644 install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Library ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall/$f" echo "Library ${f#*.} file installed as ${DESTDIR}/usr/share/shorewall/$f"
done done
if [ -z "$MACHOST" ]; then
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/usr/share/shorewall/lib.cli
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/usr/share/shorewall/lib.cli
else
eval sed -i \'\' -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/usr/share/shorewall/lib.cli
eval sed -i \'\' -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/usr/share/shorewall/lib.cli
fi
# #
# Symbolically link 'functions' to lib.base # Symbolically link 'functions' to lib.base
# #

View File

@ -131,14 +131,49 @@ case "$LIBEXEC" in
;; ;;
esac esac
# if [ -n "INSTALLSYS" ]; then
# Determine where to install the firewall script case $(uname) in
# CYGWIN*)
INSTALLSYS=CYGWIN
case $(uname) in ;;
Darwin) Darwin)
INSTALLSYS=MAC
;;
*)
if [ -f /etc/debian_version ]; then
INSTALLSYS=DEBIAN
elif [ -f /etc/redhat-release ]; then
if [ -d /etc/sysconfig/network-scripts/ ]; then
INSTALLSYS=REDHAT
else
INSTALLSYS=FEDORA
fi
elif [ -f /etc/slackware-version ] ; then
INSTALLSYS=SLACKWARE
elif [ -f /etc/arch-release ] ; then
INSTALLSYS=ARCHLINUX
else
INSTALLSYS=
fi
;;
esac
fi
case $INSTALLSYS in
CYGWIN*)
OWNER=$(id -un)
GROUP=$(id -gn)
;;
MAC)
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
SPARSE=Yes
fi
[ -z "$OWNER" ] && OWNER=root [ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=wheel [ -z "$GROUP" ] && GROUP=wheel
INSTALLD=
T= T=
;; ;;
*) *)
@ -149,6 +184,39 @@ esac
OWNERSHIP="-o $OWNER -g $GROUP" OWNERSHIP="-o $OWNER -g $GROUP"
[ -n "$TARGET" ] || TARGET=$INSTALLSYS
case "$TARGET" in
DEBIAN)
echo "Installing Debian-specific configuration..."
SPARSE=yes
;;
FEDORA)
echo "Installing Fedora-specific configuration..."
;;
REDHAT)
echo "Installing Redhat-specific configuration..."
;;
SLACKWARE)
echo "Shorewall-init is currently not supported on Slackware" >&2
exit 1
;;
ARCHLINUX)
echo "Shorewall-init is currently not supported on Arch Linux" >&2
exit 1
;;
SUSE)
echo "Installing SuSE-specific configuration..."
;;
LINUX)
echo "ERROR: Shorewall-init is not supported on this system" >&2
;;
*)
echo "ERROR: Unsupported TARGET distribution: \"$TARGET\"" >&2
exit 1;
;;
esac
if [ -n "$DESTDIR" ]; then if [ -n "$DESTDIR" ]; then
if [ `id -u` != 0 ] ; then if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root." echo "Not setting file owner/group permissions, not running as root."
@ -156,31 +224,6 @@ if [ -n "$DESTDIR" ]; then
fi fi
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST} install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
elif [ -f /etc/debian_version ]; then
DEBIAN=yes
elif [ -f /etc/SuSE-release ]; then
SUSE=Yes
elif [ -f /etc/redhat-release ]; then
FEDORA=Yes
elif [ -f /etc/slackware-version ] ; then
echo "Shorewall-init is currently not supported on Slackware" >&2
exit 1
# DEST="/etc/rc.d"
# INIT="rc.firewall"
elif [ -f /etc/arch-release ] ; then
echo "Shorewall-init is currently not supported on Arch Linux" >&2
exit 1
# DEST="/etc/rc.d"
# INIT="shorewall-init"
# ARCHLINUX=yes
elif [ -d /etc/sysconfig/network-scripts/ ]; then
#
# Assume RedHat-based
#
REDHAT=Yes
else
echo "Unknown distribution: Shorewall-init support is not available" >&2
exit 1
fi fi
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
@ -210,15 +253,17 @@ fi
# #
# Install the Init Script # Install the Init Script
# #
if [ -n "$DEBIAN" ]; then case $TARGET in
DEBIAN)
install_file init.debian.sh ${DESTDIR}/etc/init.d/shorewall-init 0544 install_file init.debian.sh ${DESTDIR}/etc/init.d/shorewall-init 0544
elif [ -n "$FEDORA" ]; then ;;
install_file init.debian.sh ${DESTDIR}/etc/init.d/shorewall-init 0544 REDHAT|FEDORA)
#elif [ -n "$ARCHLINUX" ]; then install_file init.fedora.sh ${DESTDIR}/etc/init.d/shorewall-init 0544
# install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544 ;;
else *)
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544 install_file init.sh ${DESTDIR}${DEST}/$INIT 0544
fi ;;
esac
echo "Shorewall Init script installed in ${DESTDIR}${DEST}/$INIT" echo "Shorewall Init script installed in ${DESTDIR}${DEST}/$INIT"
@ -250,7 +295,7 @@ if [ -z "$DESTDIR" ]; then
ln -s ${DEST}/${INIT} /usr/share/shorewall-init/init ln -s ${DEST}/${INIT} /usr/share/shorewall-init/init
fi fi
if [ -n "$DEBIAN" ]; then if [ $TARGET = 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-post-down.d/ mkdir -p ${DESTDIR}/etc/network/if-post-down.d/
@ -268,7 +313,7 @@ else
mkdir -p ${DESTDIR}/etc/sysconfig mkdir -p ${DESTDIR}/etc/sysconfig
if [ -z "$RPM" ]; then if [ -z "$RPM" ]; then
if [ -n "$SUSE" ]; then if [ $TARGET = SUSE ]; then
mkdir -p ${DESTDIR}/etc/sysconfig/network/if-up.d mkdir -p ${DESTDIR}/etc/sysconfig/network/if-up.d
mkdir -p ${DESTDIR}/etc/sysconfig/network/if-down.d mkdir -p ${DESTDIR}/etc/sysconfig/network/if-down.d
else else
@ -294,24 +339,30 @@ if [ -d ${DESTDIR}/etc/NetworkManager ]; then
install_file ifupdown.sh ${DESTDIR}/etc/NetworkManager/dispatcher.d/01-shorewall 0544 install_file ifupdown.sh ${DESTDIR}/etc/NetworkManager/dispatcher.d/01-shorewall 0544
fi fi
if [ -n "$DEBIAN" ]; then case $TARGET in
DEBIAN)
install_file ifupdown.sh ${DESTDIR}/etc/network/if-up.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 install_file ifupdown.sh ${DESTDIR}/etc/network/if-post-down.d/shorewall 0544
elif [ -n "$SUSE" ]; then ;;
SUSE)
if [ -z "$RPM" ]; then
install_file ifupdown.sh ${DESTDIR}/etc/sysconfig/network/if-up.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 install_file ifupdown.sh ${DESTDIR}/etc/sysconfig/network/if-down.d/shorewall 0544
elif [ -n "$REDHAT" ]; then fi
;;
REDHAT)
if [ -f ${DESTDIR}/sbin/ifup-local -o -f ${DESTDIR}/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" echo "WARNING: /sbin/ifup-local and/or /sbin/ifdown-local already exist; up/down events will not be handled"
else else
install_file ifupdown.sh ${DESTDIR}/sbin/ifup-local 0544 install_file ifupdown.sh ${DESTDIR}/sbin/ifup-local 0544
install_file ifupdown.sh ${DESTDIR}/sbin/ifdown-local 0544 install_file ifupdown.sh ${DESTDIR}/sbin/ifdown-local 0544
fi fi
fi ;;
esac
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
if [ -n "$first_install" ]; then if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then if [ $TARGET = DEBIAN ]; then
update-rc.d shorewall-init defaults update-rc.d shorewall-init defaults
@ -348,7 +399,7 @@ if [ -z "$DESTDIR" ]; then
fi fi
else else
if [ -n "$first_install" ]; then if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then if [ $TARGET = DEBIAN ]; then
if [ -n "${DESTDIR}" ]; then if [ -n "${DESTDIR}" ]; then
mkdir -p ${DESTDIR}/etc/rcS.d mkdir -p ${DESTDIR}/etc/rcS.d
fi fi
@ -360,12 +411,14 @@ else
fi fi
if [ -f ${DESTDIR}/etc/ppp ]; then if [ -f ${DESTDIR}/etc/ppp ]; then
if [ -n "$DEBIAN" ] -o -n "$SUSE" ]; then case $TARGET in
DEBIAN|SUSE)
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
mkdir -p ${DESTDIR}/etc/ppp/$directory #SuSE doesn't create the IPv6 directories mkdir -p ${DESTDIR}/etc/ppp/$directory #SuSE doesn't create the IPv6 directories
cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown ${DESTDIR}/etc/ppp/$directory/shorewall cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown ${DESTDIR}/etc/ppp/$directory/shorewall
done done
elif [ -n "$REDHAT" ]; then ;;
REDHAT)
# #
# Must use the dreaded ip_xxx.local file # Must use the dreaded ip_xxx.local file
# #
@ -382,9 +435,9 @@ if [ -f ${DESTDIR}/etc/ppp ]; then
cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown $FILE cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown $FILE
fi fi
done done
fi ;;
esac
fi fi
# #
# Report Success # Report Success
# #

View File

@ -149,7 +149,31 @@ CYGWIN=
INSTALLD='-D' INSTALLD='-D'
T='-T' T='-T'
case $(uname) in if [ -n "INSTALLSYS" ]; then
case $(uname) in
CYGWIN*)
INSTALLSYS=CYGWIN
;;
Darwin)
INSTALLSYS=MAC
;;
*)
if [ -f /etc/debian_version ]; then
INSTALLSYS=DEBIAN
elif [ -f /etc/redhat-release ]; then
INSTALLSYS=FEDORA
elif [ -f /etc/slackware-version ] ; then
INSTALLSYS=SLACKWARE
elif [ -f /etc/arch-release ] ; then
INSTALLSYS=ARCHLINUX
else
INSTALLSYS=LINUX
fi
;;
esac
fi
case $INSTALLSYS in
CYGWIN*) CYGWIN*)
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
DEST= DEST=
@ -159,7 +183,15 @@ case $(uname) in
OWNER=$(id -un) OWNER=$(id -un)
GROUP=$(id -gn) GROUP=$(id -gn)
;; ;;
Darwin) MAC)
if [ -z "$DESTDIR" ]; then
DEST=
INIT=
SPARSE=Yes
fi
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=wheel
INSTALLD= INSTALLD=
T= T=
;; ;;
@ -171,6 +203,41 @@ esac
OWNERSHIP="-o $OWNER -g $GROUP" OWNERSHIP="-o $OWNER -g $GROUP"
[ -n "$TARGET" ] || TARGET=$INSTALLSYS
case "$TARGET" in
CYGWIN)
echo "Installing Cygwin-specific configuration..."
;;
MAC)
echo "Installing Mac-specific configuration...";
;;
DEBIAN)
echo "Installing Debian-specific configuration..."
SPARSE=yes
;;
FEDORA)
echo "Installing Redhat/Fedora-specific configuration..."
;;
SLACKWARE)
echo "Installing Slackware-specific configuration..."
DEST="/etc/rc.d"
MANDIR="/usr/man"
INIT="rc.firewall"
;;
ARCHLINUX)
echo "Installing ArchLinux-specific configuration..."
DEST="/etc/rc.d"
INIT="$PRODUCT"
;;
LINUX)
;;
*)
echo "ERROR: Unknown TARGET \"$TARGET\"" >&2
exit 1;
;;
esac
if [ -n "$DESTDIR" ]; then if [ -n "$DESTDIR" ]; then
if [ `id -u` != 0 ] ; then if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root." echo "Not setting file owner/group permissions, not running as root."
@ -179,20 +246,11 @@ if [ -n "$DESTDIR" ]; then
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST} install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
elif [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
DEBIAN=yes
elif [ -f /etc/redhat-release ]; then
FEDORA=yes
elif [ -f /etc/slackware-version ] ; then
DEST="/etc/rc.d"
INIT="rc.firewall"
elif [ -f /etc/arch-release ] ; then
DEST="/etc/rc.d"
INIT="$PRODUCT"
ARCHLINUX=yes
fi
if [ -z "$DESTDIR" ]; then if [ -n "$SYSTEMD" ]; then
mkdir -p ${DESTDIR}/lib/systemd/system
fi
else
if [ ! -f /usr/share/shorewall/coreversion ]; then if [ ! -f /usr/share/shorewall/coreversion ]; then
echo "$PRODUCT $VERSION requires Shorewall Core which does not appear to be installed" >&2 echo "$PRODUCT $VERSION requires Shorewall Core which does not appear to be installed" >&2
exit 1 exit 1
@ -201,8 +259,6 @@ if [ -z "$DESTDIR" ]; then
if [ -f /lib/systemd/system ]; then if [ -f /lib/systemd/system ]; then
SYSTEMD=Yes SYSTEMD=Yes
fi fi
elif [ -n "$SYSTEMD" ]; then
mkdir -p ${DESTDIR}/lib/systemd/system
fi fi
echo "Installing $Product Version $VERSION" echo "Installing $Product Version $VERSION"
@ -238,22 +294,25 @@ delete_file ${DESTDIR}/usr/share/$PRODUCT/xmodules
install_file $PRODUCT ${DESTDIR}/sbin/$PRODUCT 0544 install_file $PRODUCT ${DESTDIR}/sbin/$PRODUCT 0544
eval sed -i \'``s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/$PRODUCT
echo "$Product control program installed in ${DESTDIR}/sbin/$PRODUCT" echo "$Product control program installed in ${DESTDIR}/sbin/$PRODUCT"
# #
# Install the Firewall Script # Install the Firewall Script
# #
if [ -n "$DEBIAN" ]; then case $TARGET in
DEBIAN)
install_file init.debian.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544 install_file init.debian.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544
elif [ -n "$FEDORA" ]; then ;;
FEDORA)
install_file init.fedora.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544 install_file init.fedora.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544
elif [ -n "$ARCHLINUX" ]; then ;;
ARCHLINUX)
install_file init.archlinux.sh ${DESTDIR}/${DEST}/$INIT 0544 install_file init.archlinux.sh ${DESTDIR}/${DEST}/$INIT 0544
else ;;
*)
install_file init.sh ${DESTDIR}/${DEST}/$INIT 0544 install_file init.sh ${DESTDIR}/${DEST}/$INIT 0544
fi ;;
esac
echo "$Product script installed in ${DESTDIR}${DEST}/$INIT" echo "$Product script installed in ${DESTDIR}${DEST}/$INIT"
@ -289,7 +348,7 @@ if [ ! -f ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf ]; then
echo "Config file installed as ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf" echo "Config file installed as ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf"
fi fi
if [ -n "$ARCHLINUX" ] ; then if [ $TARGET = ARCHLINUX ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf
fi fi
@ -400,7 +459,7 @@ if [ -z "$DESTDIR" ]; then
touch /var/log/$PRODUCT-init.log touch /var/log/$PRODUCT-init.log
if [ -n "$first_install" ]; then if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then if [ $TARGET = DEBIAN ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/$PRODUCT run_install $OWNERSHIP -m 0644 default.debian /etc/default/$PRODUCT
update-rc.d $PRODUCT defaults update-rc.d $PRODUCT defaults

View File

@ -119,9 +119,6 @@ if [ -z "$INIT" ] ; then
fi fi
ANNOTATED= ANNOTATED=
CYGWIN=
MAC=
MACHOST=
MANDIR=${MANDIR:-"/usr/share/man"} MANDIR=${MANDIR:-"/usr/share/man"}
SPARSE= SPARSE=
INSTALLD='-D' INSTALLD='-D'
@ -144,7 +141,31 @@ case "$PERLLIB" in
;; ;;
esac esac
case $(uname) in if [ -n "INSTALLSYS" ]; then
case $(uname) in
CYGWIN*)
INSTALLSYS=CYGWIN
;;
Darwin)
INSTALLSYS=MAC
;;
*)
if [ -f /etc/debian_version ]; then
INSTALLSYS=DEBIAN
elif [ -f /etc/redhat-release ]; then
INSTALLSYS=FEDORA
elif [ -f /etc/slackware-version ] ; then
INSTALLSYS=SLACKWARE
elif [ -f /etc/arch-release ] ; then
INSTALLSYS=ARCHLINUX
else
INSTALLSYS=LINUX
fi
;;
esac
fi
case $INSTALLSYS in
CYGWIN*) CYGWIN*)
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
DEST= DEST=
@ -153,10 +174,8 @@ case $(uname) in
OWNER=$(id -un) OWNER=$(id -un)
GROUP=$(id -gn) GROUP=$(id -gn)
CYGWIN=Yes
SPARSE=Yes
;; ;;
Darwin) MAC)
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
DEST= DEST=
INIT= INIT=
@ -165,8 +184,6 @@ case $(uname) in
[ -z "$OWNER" ] && OWNER=root [ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=wheel [ -z "$GROUP" ] && GROUP=wheel
MAC=Yes
MACHOST=Yes
INSTALLD= INSTALLD=
T= T=
;; ;;
@ -229,21 +246,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
# Determine where to install the firewall script # Determine where to install the firewall script
# #
if [ -n "$DESTDIR" ]; then if [ $PRODUCT = shorewall ]; then
if [ -z "$CYGWIN" ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi
fi
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
CYGWIN=
MAC=
else
if [ $PRODUCT = shorewall ]; then
# #
# Verify that Perl is installed # Verify that Perl is installed
# #
@ -252,36 +255,56 @@ else
echo " Try perl -c $PWD/Perl/compiler.pl" >&2 echo " Try perl -c $PWD/Perl/compiler.pl" >&2
exit 1 exit 1
fi fi
else fi
[ -x /usr/share/shorewall/compiler.pl ] || \
{ echo " ERROR: Shorewall >= 4.3.5 is not installed" >&2; exit 1; }
fi
if [ -n "$CYGWIN" ]; then [ -n "$TARGET" ] || TARGET=$INSTALLSYS
case "$TARGET" in
CYGWIN)
echo "Installing Cygwin-specific configuration..." echo "Installing Cygwin-specific configuration..."
elif [ -n "$MAC" ]; then ;;
echo "Installing Mac-specific configuration..." MAC)
else echo "Installing Mac-specific configuration...";
if [ -f /etc/debian_version ]; then ;;
DEBIAN)
echo "Installing Debian-specific configuration..." echo "Installing Debian-specific configuration..."
DEBIAN=yes
SPARSE=yes SPARSE=yes
elif [ -f /etc/redhat-release ]; then ;;
FEDORA)
echo "Installing Redhat/Fedora-specific configuration..." echo "Installing Redhat/Fedora-specific configuration..."
FEDORA=yes ;;
elif [ -f /etc/slackware-version ] ; then SLACKWARE)
echo "Installing Slackware-specific configuration..." echo "Installing Slackware-specific configuration..."
DEST="/etc/rc.d" DEST="/etc/rc.d"
MANDIR="/usr/man" MANDIR="/usr/man"
SLACKWARE=yes
INIT="rc.firewall" INIT="rc.firewall"
elif [ -f /etc/arch-release ] ; then ;;
ARCHLINUX)
echo "Installing ArchLinux-specific configuration..." echo "Installing ArchLinux-specific configuration..."
DEST="/etc/rc.d" DEST="/etc/rc.d"
INIT="$PRODUCT" INIT="$PRODUCT"
ARCHLINUX=yes ;;
LINUX)
;;
*)
echo "ERROR: Unknown TARGET \"$TARGET\"" >&2
exit 1;
;;
esac
if [ -n "$DESTDIR" ]; then
if [ $INSTALLSYS != CYGWIN ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi fi
fi fi
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
elif [ -z "$DESTDIR" ]; then
[ -x /usr/share/shorewall/compiler.pl ] || \
{ echo " ERROR: Shorewall >= 4.3.5 is not installed" >&2; exit 1; }
fi fi
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
@ -308,38 +331,39 @@ if [ -z "${DESTDIR}" -a $PRODUCT = shorewall -a ! -f /usr/share/$PRODUCT/corever
exit 1 exit 1
fi fi
if [ -z "$CYGWIN" ]; then if [ $TARGET != CYGWIN ]; then
install_file $PRODUCT ${DESTDIR}/sbin/$PRODUCT 0755 install_file $PRODUCT ${DESTDIR}/sbin/$PRODUCT 0755
if [ -z "$MACHOST" ]; then
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/$PRODUCT
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/$PRODUCT
else
eval sed -i \'\' -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/$PRODUCT
eval sed -i \'\' -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/$PRODUCT
fi
echo "$PRODUCT control program installed in ${DESTDIR}/sbin/$PRODUCT" echo "$PRODUCT control program installed in ${DESTDIR}/sbin/$PRODUCT"
else else
install_file $PRODUCT ${DESTDIR}/bin/$PRODUCT 0755 install_file $PRODUCT ${DESTDIR}/bin/$PRODUCT 0755
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/bin/$PRODUCT
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/bin/$PRODUCT
echo "$PRODUCT control program installed in ${DESTDIR}/bin/$PRODUCT" echo "$PRODUCT control program installed in ${DESTDIR}/bin/$PRODUCT"
fi fi
# #
# Install the Firewall Script # Install the Firewall Script
# #
if [ -n "$DEBIAN" ]; then case $TARGET in
DEBIAN)
install_file init.debian.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544 install_file init.debian.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544
elif [ -n "$FEDORA" ]; then ;;
FEDORA)
install_file init.fedora.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544 install_file init.fedora.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544
elif [ -n "$ARCHLINUX" ]; then ;;
ARCHLINUX)
install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544 install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544
elif [ -n "$SLACKWARE" -a $PRODUCT = shorewall ]; then ;;
SLACKWARE)
if [ $PRODUCT = shorewall ]; then
install_file init.slackware.firewall.sh ${DESTDIR}${DEST}/rc.firewall 0644 install_file init.slackware.firewall.sh ${DESTDIR}${DEST}/rc.firewall 0644
install_file init.slackware.$PRODUCT.sh ${DESTDIR}${DEST}/rc.$PRODUCT 0644 install_file init.slackware.$PRODUCT.sh ${DESTDIR}${DEST}/rc.$PRODUCT 0644
elif [ -n "$INIT" ]; then fi
;;
*)
if [ -n "$INIT" ]; then
install_file init.sh ${DESTDIR}${DEST}/$INIT 0544 install_file init.sh ${DESTDIR}${DEST}/$INIT 0544
fi fi
;;
esac
[ -n "$INIT" ] && echo "$Product script installed in ${DESTDIR}${DEST}/$INIT" [ -n "$INIT" ] && echo "$Product script installed in ${DESTDIR}${DEST}/$INIT"
@ -436,7 +460,7 @@ run_install $OWNERSHIP -m 0644 $PRODUCT.conf.annotated ${DESTDIR}/usr/share/$PRO
if [ ! -f ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf ]; then if [ ! -f ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf ]; then
run_install $OWNERSHIP -m 0644 $PRODUCT.conf${suffix} ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf run_install $OWNERSHIP -m 0644 $PRODUCT.conf${suffix} ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf
if [ -n "$DEBIAN" ] && mywhich perl; then if [ $TARGET = DEBIAN ] && mywhich perl; then
# #
# Make a Debian-like $PRODUCT.conf # Make a Debian-like $PRODUCT.conf
# #
@ -447,7 +471,7 @@ if [ ! -f ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf ]; then
fi fi
if [ -n "$ARCHLINUX" ] ; then if [ $TARGET = ARCHLINUX ] ; then
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${DESTDIR}/etc/$PRODUCT/$PRODUCT.conf
fi fi
@ -1090,7 +1114,7 @@ if [ -d ${DESTDIR}/etc/logrotate.d ]; then
fi fi
if [ -z "$DESTDIR" -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 if [ $TARGET = DEBIAN ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/$PRODUCT run_install $OWNERSHIP -m 0644 default.debian /etc/default/$PRODUCT
update-rc.d $PRODUCT defaults update-rc.d $PRODUCT defaults
@ -1126,7 +1150,7 @@ if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
else else
cant_autostart cant_autostart
fi fi
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically elif [ "$INIT" != rc.f ]; then #Slackware starts this automatically
cant_autostart cant_autostart
fi fi
fi fi

View File

@ -5,7 +5,7 @@
<!--/$Id$--> <!--/$Id$-->
<articleinfo> <articleinfo>
<title>Shorewall 4.5 Documentation</title> <title>Shorewall 4.4/4.5 Documentation</title>
<authorgroup> <authorgroup>
<author> <author>
@ -55,7 +55,7 @@
<tgroup align="left" cols="3"> <tgroup align="left" cols="3">
<tbody> <tbody>
<row> <row>
<entry></entry> <entry/>
<entry><ulink url="LXC.html">Linux Containers <entry><ulink url="LXC.html">Linux Containers
(LXC)</ulink></entry> (LXC)</ulink></entry>
@ -285,7 +285,7 @@
<entry><ulink url="ports.htm">Port Information</ulink></entry> <entry><ulink url="ports.htm">Port Information</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -294,7 +294,7 @@
<entry><ulink url="PortKnocking.html">Port Knocking and Other Uses <entry><ulink url="PortKnocking.html">Port Knocking and Other Uses
of the 'Recent Match'</ulink></entry> of the 'Recent Match'</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -303,7 +303,7 @@
<entry><ulink url="PPTP.htm">PPTP</ulink></entry> <entry><ulink url="PPTP.htm">PPTP</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -312,7 +312,7 @@
<entry><ulink url="ProxyARP.htm">Proxy ARP</ulink></entry> <entry><ulink url="ProxyARP.htm">Proxy ARP</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -322,7 +322,7 @@
<entry><ulink url="shorewall_quickstart_guide.htm">QuickStart <entry><ulink url="shorewall_quickstart_guide.htm">QuickStart
Guides</ulink></entry> Guides</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -330,7 +330,7 @@
<entry><ulink url="NewRelease.html">Release Model</ulink></entry> <entry><ulink url="NewRelease.html">Release Model</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -339,7 +339,7 @@
<entry><ulink <entry><ulink
url="shorewall_prerequisites.htm">Requirements</ulink></entry> url="shorewall_prerequisites.htm">Requirements</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -348,7 +348,7 @@
<entry><ulink url="Shorewall_and_Routing.html">Routing and <entry><ulink url="Shorewall_and_Routing.html">Routing and
Shorewall</ulink></entry> Shorewall</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -357,7 +357,7 @@
<entry><ulink url="Multiple_Zones.html">Routing on One <entry><ulink url="Multiple_Zones.html">Routing on One
Interface</ulink></entry> Interface</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -366,7 +366,7 @@
<entry><ulink url="samba.htm">Samba</ulink></entry> <entry><ulink url="samba.htm">Samba</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -376,7 +376,7 @@
<entry><ulink url="Shorewall-init.html">Shorewall <entry><ulink url="Shorewall-init.html">Shorewall
Init</ulink></entry> Init</ulink></entry>
<entry></entry> <entry/>
</row> </row>
<row> <row>
@ -386,7 +386,7 @@
<entry><ulink url="Shorewall-Lite.html">Shorewall <entry><ulink url="Shorewall-Lite.html">Shorewall
Lite</ulink></entry> Lite</ulink></entry>
<entry></entry> <entry/>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>