forked from extern/shorewall_code
Cleanup of install scripts based on feedback from Mr. Dash4
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
76f8a9e171
commit
8c981e0464
@ -30,8 +30,6 @@ usage() # $1 = exit status
|
||||
echo "usage: $ME"
|
||||
echo " $ME -v"
|
||||
echo " $ME -h"
|
||||
echo " $ME -s"
|
||||
echo " $ME -f"
|
||||
exit $1
|
||||
}
|
||||
|
||||
@ -196,14 +194,6 @@ while [ $finished -eq 0 ]; do
|
||||
echo "Shorewall Firewall Installer Version $VERSION"
|
||||
exit 0
|
||||
;;
|
||||
a*)
|
||||
ANNOTATED=Yes
|
||||
option=${option#a}
|
||||
;;
|
||||
p*)
|
||||
ANNOTATED=
|
||||
option=${option#p}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
|
@ -88,20 +88,6 @@ install_file() # $1 = source $2 = target $3 = mode
|
||||
|
||||
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
|
||||
|
||||
# DEST is the SysVInit script directory
|
||||
# INIT is the name of the script in the $DEST directory
|
||||
# ARGS is "yes" if we've already parsed an argument
|
||||
#
|
||||
ARGS=""
|
||||
|
||||
if [ -z "$DEST" ] ; then
|
||||
DEST="/etc/init.d"
|
||||
fi
|
||||
|
||||
if [ -z "$INIT" ] ; then
|
||||
INIT="shorewall-init"
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
-h|help|?)
|
||||
@ -116,7 +102,6 @@ while [ $# -gt 0 ] ; do
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
ARGS="yes"
|
||||
done
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||
@ -195,9 +180,11 @@ case "$TARGET" in
|
||||
;;
|
||||
FEDORA)
|
||||
echo "Installing Fedora-specific configuration..."
|
||||
DEST=/etc/rc.d/init.d
|
||||
;;
|
||||
REDHAT)
|
||||
echo "Installing Redhat-specific configuration..."
|
||||
DEST=/etc/rc.d/init.d
|
||||
;;
|
||||
SLACKWARE)
|
||||
echo "Shorewall-init is currently not supported on Slackware" >&2
|
||||
@ -219,6 +206,14 @@ case "$TARGET" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$DEST" ] ; then
|
||||
DEST="/etc/init.d"
|
||||
fi
|
||||
|
||||
if [ -z "$INIT" ] ; then
|
||||
INIT="shorewall-init"
|
||||
fi
|
||||
|
||||
if [ -n "$DESTDIR" ]; then
|
||||
if [ `id -u` != 0 ] ; then
|
||||
echo "Not setting file owner/group permissions, not running as root."
|
||||
|
@ -103,17 +103,6 @@ fi
|
||||
#
|
||||
# Parse the run line
|
||||
#
|
||||
# DEST is the SysVInit script directory
|
||||
# INIT is the name of the script in the $DEST directory
|
||||
#
|
||||
if [ -z "$DEST" ] ; then
|
||||
DEST="/etc/init.d"
|
||||
fi
|
||||
|
||||
if [ -z "$INIT" ] ; then
|
||||
INIT="$PRODUCT"
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
-h|help|?)
|
||||
@ -224,6 +213,7 @@ case "$TARGET" in
|
||||
;;
|
||||
FEDORA|REDHAT)
|
||||
echo "Installing Redhat/Fedora-specific configuration..."
|
||||
DEST=/etc/rc.d/init.d
|
||||
;;
|
||||
SLACKWARE)
|
||||
echo "Installing Slackware-specific configuration..."
|
||||
@ -244,6 +234,14 @@ case "$TARGET" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$DEST" ] ; then
|
||||
DEST="/etc/init.d"
|
||||
fi
|
||||
|
||||
if [ -z "$INIT" ] ; then
|
||||
INIT="$PRODUCT"
|
||||
fi
|
||||
|
||||
if [ -n "$DESTDIR" ]; then
|
||||
if [ `id -u` != 0 ] ; then
|
||||
echo "Not setting file owner/group permissions, not running as root."
|
||||
|
@ -105,19 +105,9 @@ fi
|
||||
#
|
||||
# Parse the run line
|
||||
#
|
||||
# DEST is the SysVInit script directory
|
||||
# INIT is the name of the script in the $DEST directory
|
||||
#
|
||||
T="-T"
|
||||
|
||||
if [ -z "$DEST" ] ; then
|
||||
DEST="/etc/init.d"
|
||||
fi
|
||||
|
||||
if [ -z "$INIT" ] ; then
|
||||
INIT="$PRODUCT"
|
||||
fi
|
||||
|
||||
ANNOTATED=
|
||||
MANDIR=${MANDIR:-"/usr/share/man"}
|
||||
SPARSE=
|
||||
@ -278,6 +268,7 @@ case "$TARGET" in
|
||||
;;
|
||||
FEDORA|REDHAT)
|
||||
echo "Installing Redhat/Fedora-specific configuration..."
|
||||
DEST="/etc/rc.d/init.d"
|
||||
;;
|
||||
SLACKWARE)
|
||||
echo "Installing Slackware-specific configuration..."
|
||||
@ -298,6 +289,14 @@ case "$TARGET" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$DEST" ] ; then
|
||||
DEST="/etc/init.d"
|
||||
fi
|
||||
|
||||
if [ -z "$INIT" ] ; then
|
||||
INIT="$PRODUCT"
|
||||
fi
|
||||
|
||||
if [ -n "$DESTDIR" ]; then
|
||||
if [ $INSTALLSYS != CYGWIN ]; then
|
||||
if [ `id -u` != 0 ] ; then
|
||||
@ -308,7 +307,7 @@ if [ -n "$DESTDIR" ]; then
|
||||
|
||||
install -d $OWNERSHIP -m 755 ${DESTDIR}/sbin
|
||||
install -d $OWNERSHIP -m 755 ${DESTDIR}${DEST}
|
||||
elif [ -z "$DESTDIR" ]; then
|
||||
else
|
||||
[ -x /usr/share/shorewall/compiler.pl ] || \
|
||||
{ echo " ERROR: Shorewall >= 4.3.5 is not installed" >&2; exit 1; }
|
||||
fi
|
||||
@ -353,7 +352,7 @@ case $TARGET in
|
||||
install_file init.debian.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544
|
||||
;;
|
||||
FEDORA|REDHAT)
|
||||
install_file init.fedora.sh ${DESTDIR}/etc/init.d/$PRODUCT 0544
|
||||
install_file init.fedora.sh ${DESTDIR}${DEST}/$PRODUCT 0544
|
||||
;;
|
||||
ARCHLINUX)
|
||||
install_file init.archlinux.sh ${DESTDIR}${DEST}/$INIT 0544
|
||||
|
@ -112,7 +112,7 @@ rm -rf /etc/shorewall
|
||||
rm -rf /etc/shorewall-*.bkout
|
||||
rm -rf /var/lib/shorewall
|
||||
rm -rf /var/lib/shorewall-*.bkout
|
||||
rm -rf $PERLLIB}/Shorewall/*
|
||||
rm -rf ${PERLLIB}/Shorewall/*
|
||||
rm -rf ${LIBEXEC}/shorewall
|
||||
rm -rf /usr/share/shorewall/configfiles/
|
||||
rm -rf /usr/share/shorewall/Samples/
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
<year>2009</year>
|
||||
|
||||
<year>2012</year>
|
||||
|
||||
<holder>Thomas M. Eastep</holder>
|
||||
</copyright>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user