Apply Togan's patch with fixes

/sbin/shorewall and /sbin/shorewall6 modified
	uninstallers modified
	Additional installer changes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-04-17 11:20:26 -07:00
parent aca5b33858
commit cdf2014ce2
12 changed files with 95 additions and 66 deletions

View File

@ -124,7 +124,7 @@ done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
# #
# Determine where to install the firewall script # Determine where to install the firewall script
# #
@ -260,9 +260,9 @@ fi
# Install the ifupdown script # Install the ifupdown script
# #
mkdir -p ${DESTDIR}/usr/${LIBEXEC}/shorewall-init mkdir -p ${DESTDIR}${LIBEXEC}/shorewall-init
install_file ifupdown.sh ${DESTDIR}/usr/${LIBEXEC}/shorewall-init/ifupdown 0544 install_file ifupdown.sh ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown 0544
if [ -d ${DESTDIR}/etc/NetworkManager ]; then 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
@ -333,7 +333,7 @@ if [ -f ${DESTDIR}/etc/ppp ]; then
if [ -n "$DEBIAN" ] -o -n "$SUSE" ]; then if [ -n "$DEBIAN" ] -o -n "$SUSE" ]; then
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}/usr/${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 elif [ -n "$REDHAT" ]; then
# #
@ -343,13 +343,13 @@ if [ -f ${DESTDIR}/etc/ppp ]; then
FILE=${DESTDIR}/etc/ppp/$file FILE=${DESTDIR}/etc/ppp/$file
if [ -f $FILE ]; then if [ -f $FILE ]; then
if fgrep -q Shorewall-based $FILE ; then if fgrep -q Shorewall-based $FILE ; then
cp -fp ${DESTDIR}/usr/${LIBEXEC}/shorewall-init/ifupdown $FILE cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown $FILE
else else
echo "$FILE already exists -- ppp devices will not be handled" echo "$FILE already exists -- ppp devices will not be handled"
break break
fi fi
else else
cp -fp ${DESTDIR}/usr/${LIBEXEC}/shorewall-init/ifupdown $FILE cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown $FILE
fi fi
done done
fi fi

View File

@ -60,7 +60,7 @@ else
VERSION="" VERSION=""
fi fi
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
echo "Uninstalling Shorewall Init $VERSION" echo "Uninstalling Shorewall Init $VERSION"
@ -107,7 +107,7 @@ if [ -d /etc/ppp ]; then
fi fi
rm -rf /usr/share/shorewall-init rm -rf /usr/share/shorewall-init
rm -rf /usr/${LIBEXEC}/shorewall-init rm -rf ${LIBEXEC}/shorewall-init
echo "Shorewall Init Uninstalled" echo "Shorewall Init Uninstalled"

View File

@ -123,7 +123,7 @@ done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
# #
# Determine where to install the firewall script # Determine where to install the firewall script
# #
@ -229,7 +229,7 @@ echo "Shorewall Lite script installed in ${DESTDIR}${DEST}/$INIT"
# #
mkdir -p ${DESTDIR}/etc/shorewall-lite mkdir -p ${DESTDIR}/etc/shorewall-lite
mkdir -p ${DESTDIR}/usr/share/shorewall-lite mkdir -p ${DESTDIR}/usr/share/shorewall-lite
mkdir -p ${DESTDIR}/usr/${LIBEXEC}/shorewall-lite mkdir -p ${DESTDIR}${LIBEXEC}/shorewall-lite
mkdir -p ${DESTDIR}/var/lib/shorewall-lite mkdir -p ${DESTDIR}/var/lib/shorewall-lite
chmod 755 ${DESTDIR}/etc/shorewall-lite chmod 755 ${DESTDIR}/etc/shorewall-lite
@ -282,20 +282,20 @@ echo "Common functions linked through ${DESTDIR}/usr/share/shorewall-lite/functi
# Install Shorecap # Install Shorecap
# #
install_file shorecap ${DESTDIR}/usr/${LIBEXEC}/shorewall-lite/shorecap 0755 install_file shorecap ${DESTDIR}${LIBEXEC}/shorewall-lite/shorecap 0755
echo echo
echo "Capability file builder installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall-lite/shorecap" echo "Capability file builder installed in ${DESTDIR}${LIBEXEC}/shorewall-lite/shorecap"
# #
# Install wait4ifup # Install wait4ifup
# #
if [ -f wait4ifup ]; then if [ -f wait4ifup ]; then
install_file wait4ifup ${DESTDIR}/usr/${LIBEXEC}/shorewall-lite/wait4ifup 0755 install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall-lite/wait4ifup 0755
echo echo
echo "wait4ifup installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall-lite/wait4ifup" echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall-lite/wait4ifup"
fi fi
# #

View File

@ -72,7 +72,7 @@ else
VERSION="" VERSION=""
fi fi
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
echo "Uninstalling Shorewall Lite $VERSION" echo "Uninstalling Shorewall Lite $VERSION"
@ -109,7 +109,7 @@ rm -rf /etc/shorewall-lite-*.bkout
rm -rf /var/lib/shorewall-lite rm -rf /var/lib/shorewall-lite
rm -rf /var/lib/shorewall-lite-*.bkout rm -rf /var/lib/shorewall-lite-*.bkout
rm -rf /usr/share/shorewall-lite rm -rf /usr/share/shorewall-lite
rm -rf /usr/${LIBEXEC}/shorewall-lite rm -rf ${LIBEXEC}/shorewall-lite
rm -rf /usr/share/shorewall-lite-*.bkout rm -rf /usr/share/shorewall-lite-*.bkout
rm -f /etc/logrotate.d/shorewall-lite rm -f /etc/logrotate.d/shorewall-lite

View File

@ -107,8 +107,8 @@ fi
SPARSE= SPARSE=
MANDIR=${MANDIR:-"/usr/share/man"} MANDIR=${MANDIR:-"/usr/share/man"}
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
[ -n "${PERLLIB:=share/shorewall}" ] [ -n "${PERLLIB:=/usr/share/shorewall}" ]
INSTALLD='-D' INSTALLD='-D'
@ -236,8 +236,14 @@ fi
if [ -z "$CYGWIN" ]; then if [ -z "$CYGWIN" ]; then
install_file shorewall ${DESTDIR}/sbin/shorewall 0755 install_file shorewall ${DESTDIR}/sbin/shorewall 0755
echo "shorewall control program installed in ${DESTDIR}/sbin/shorewall" echo "shorewall control program installed in ${DESTDIR}/sbin/shorewall"
if [ -z "$MAC" ]; then
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall
else
eval sed -i -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall
eval sed -i -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall
fi
else else
install_file shorewall ${DESTDIR}/bin/shorewall 0755 install_file shorewall ${DESTDIR}/bin/shorewall 0755
echo "shorewall control program installed in ${DESTDIR}/bin/shorewall" echo "shorewall control program installed in ${DESTDIR}/bin/shorewall"
@ -265,8 +271,8 @@ fi
# Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed # Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed
# #
mkdir -p ${DESTDIR}/etc/shorewall mkdir -p ${DESTDIR}/etc/shorewall
mkdir -p ${DESTDIR}/usr/${LIBEXEC}/shorewall mkdir -p ${DESTDIR}${LIBEXEC}/shorewall
mkdir -p ${DESTDIR}/usr/${PERLLIB}/Shorewall mkdir -p ${DESTDIR}${PERLLIB}/Shorewall
mkdir -p ${DESTDIR}/usr/share/shorewall/configfiles mkdir -p ${DESTDIR}/usr/share/shorewall/configfiles
mkdir -p ${DESTDIR}/var/lib/shorewall mkdir -p ${DESTDIR}/var/lib/shorewall
@ -331,10 +337,10 @@ delete_file ${DESTDIR}/usr/share/shorewall/prog.footer
# Install wait4ifup # Install wait4ifup
# #
install_file wait4ifup ${DESTDIR}/usr/${LIBEXEC}/shorewall/wait4ifup 0755 install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall/wait4ifup 0755
echo echo
echo "wait4ifup installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall/wait4ifup" echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall/wait4ifup"
# #
# Install the policy file # Install the policy file
@ -824,23 +830,23 @@ chmod 755 ${DESTDIR}/usr/share/shorewall/Shorewall
# #
cd Perl cd Perl
install_file compiler.pl ${DESTDIR}/usr/${LIBEXEC}/shorewall/compiler.pl 0755 install_file compiler.pl ${DESTDIR}${LIBEXEC}/shorewall/compiler.pl 0755
echo echo
echo "Compiler installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall/compiler.pl" echo "Compiler installed in ${DESTDIR}${LIBEXEC}/shorewall/compiler.pl"
# #
# Install the params file helper # Install the params file helper
# #
install_file getparams ${DESTDIR}/usr/${LIBEXEC}/shorewall/getparams 0755 install_file getparams ${DESTDIR}${LIBEXEC}/shorewall/getparams 0755
echo echo
echo "Params file helper installed in ${DESTDIR}/usr/share/shorewall/getparams" echo "Params file helper installed in ${DESTDIR}${LIBEXEC}/shorewall/getparams"
# #
# Install the libraries # Install the libraries
# #
for f in Shorewall/*.pm ; do for f in Shorewall/*.pm ; do
install_file $f ${DESTDIR}/usr/${PERLLIB}/$f 0644 install_file $f ${DESTDIR}${PERLLIB}/$f 0644
echo "Module ${f%.*} installed as ${DESTDIR}/usr/${PERLLIB}/$f" echo "Module ${f%.*} installed as ${DESTDIR}${PERLLIB}/$f"
done done
# #
# Install the program skeleton files # Install the program skeleton files
@ -901,7 +907,7 @@ fi
if [ -z "$DESTDIR" ]; then if [ -z "$DESTDIR" ]; then
rm -rf /usr/share/shorewall-perl rm -rf /usr/share/shorewall-perl
rm -rf /usr/share/shorewall-shell rm -rf /usr/share/shorewall-shell
[ "$PERLLIB" != share/shorewall ] && rm -rf /usr/share/shorewall/Shorewall [ "$PERLLIB" != /usr/share/shorewall ] && rm -rf /usr/share/shorewall/Shorewall
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

View File

@ -364,9 +364,9 @@ compiler() {
fi fi
if [ $g_perllib = share/shorewall ]; then if [ $g_perllib = share/shorewall ]; then
$PERL $debugflags /usr/$g_libexec/shorewall/compiler.pl $options $@ $PERL $debugflags $g_libexec/shorewall/compiler.pl $options $@
else else
PERL5LIB=$g_perllib $PERL $debugflags /usr/$g_libexec/shorewall/compiler.pl $options $@ PERL5LIB=$g_perllib $PERL $debugflags $g_libexec/shorewall/compiler.pl $options $@
fi fi
} }
@ -1140,7 +1140,7 @@ reload_command() # $* = original arguments less the command.
local root local root
root=root root=root
local libexec local libexec
libexec=share libexec=/usr/share
litedir=/var/lib/shorewall-lite litedir=/var/lib/shorewall-lite
@ -1203,7 +1203,16 @@ reload_command() # $* = original arguments less the command.
temp=$(rsh_command /sbin/shorewall-lite show config 2> /dev/null | grep ^LIBEXEC | sed 's/LIBEXEC is //') temp=$(rsh_command /sbin/shorewall-lite show config 2> /dev/null | grep ^LIBEXEC | sed 's/LIBEXEC is //')
[ -n "$temp" ] && libexec="$temp" if [ -n "$temp" ]; then
case $temp in
/*)
libexec="$temp"
;;
*)
libexec=/usr/$temp
;;
esac
fi
if [ -z "$getcaps" ]; then if [ -z "$getcaps" ]; then
SHOREWALL_DIR=$(resolve_file $directory) SHOREWALL_DIR=$(resolve_file $directory)
@ -1221,7 +1230,7 @@ reload_command() # $* = original arguments less the command.
[ -n "$DONT_LOAD" ] && DONT_LOAD="$(echo $DONT_LOAD | tr ',' ' ')" [ -n "$DONT_LOAD" ] && DONT_LOAD="$(echo $DONT_LOAD | tr ',' ' ')"
progress_message "Getting Capabilities on system $system..." progress_message "Getting Capabilities on system $system..."
if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IPTABLES=$IPTABLES DONT_LOAD=\"$DONT_LOAD\" /usr/$libexec/shorewall-lite/shorecap" > $directory/capabilities; then if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IPTABLES=$IPTABLES DONT_LOAD=\"$DONT_LOAD\" $libexec/shorewall-lite/shorecap" > $directory/capabilities; then
fatal_error "ERROR: Capturing capabilities on system $system failed" fatal_error "ERROR: Capturing capabilities on system $system failed"
fi fi
fi fi
@ -1584,7 +1593,7 @@ CONFDIR=/etc/shorewall
g_product="Shorewall" g_product="Shorewall"
g_recovering= g_recovering=
g_timestamp= g_timestamp=
g_libexec=share g_libexec=/usr/share/share
g_perllib=share/shorewall g_perllib=share/shorewall
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir [ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir

View File

@ -72,8 +72,8 @@ else
VERSION="" VERSION=""
fi fi
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
[ -n "${PERLLIB:=share/shorewall}" ] [ -n "${PERLLIB:=/usr/share/shorewall}" ]
echo "Uninstalling shorewall $VERSION" echo "Uninstalling shorewall $VERSION"
@ -109,8 +109,8 @@ rm -rf /etc/shorewall
rm -rf /etc/shorewall-*.bkout rm -rf /etc/shorewall-*.bkout
rm -rf /var/lib/shorewall rm -rf /var/lib/shorewall
rm -rf /var/lib/shorewall-*.bkout rm -rf /var/lib/shorewall-*.bkout
rm -rf /usr/$PERLLIB}/Shorewall/* rm -rf $PERLLIB}/Shorewall/*
rm -rf /usr/${LIBEXEC}/shorewall rm -rf ${LIBEXEC}/shorewall
rm -rf /usr/share/shorewall rm -rf /usr/share/shorewall
rm -rf /usr/share/shorewall-*.bkout rm -rf /usr/share/shorewall-*.bkout
rm -rf /usr/share/man/man5/shorewall* rm -rf /usr/share/man/man5/shorewall*

View File

@ -123,7 +123,7 @@ done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
# #
# Determine where to install the firewall script # Determine where to install the firewall script
# #
@ -188,7 +188,7 @@ else
rm -rf ${DESTDIR}/etc/shorewall6-lite rm -rf ${DESTDIR}/etc/shorewall6-lite
rm -rf ${DESTDIR}/usr/share/shorewall6-lite rm -rf ${DESTDIR}/usr/share/shorewall6-lite
rm -rf ${DESTDIR}/var/lib/shorewall6-lite rm -rf ${DESTDIR}/var/lib/shorewall6-lite
[ "$LIBEXEC" = share ] || rm -rf /usr/share/shorewall6-lite/wait4ifup /usr/share/shorewall6-lite/shorecap [ "$LIBEXEC" = /usr/share ] || rm -rf /usr/share/shorewall6-lite/wait4ifup /usr/share/shorewall6-lite/shorecap
fi fi
# #
@ -227,7 +227,7 @@ echo "Shorewall6 Lite script installed in ${DESTDIR}${DEST}/$INIT"
# #
mkdir -p ${DESTDIR}/etc/shorewall6-lite mkdir -p ${DESTDIR}/etc/shorewall6-lite
mkdir -p ${DESTDIR}/usr/share/shorewall6-lite mkdir -p ${DESTDIR}/usr/share/shorewall6-lite
mkdir -p ${DESTDIR}/usr/${LIBEXEC}/shorewall6-lite mkdir -p ${DESTDIR}${LIBEXEC}/shorewall6-lite
mkdir -p ${DESTDIR}/var/lib/shorewall6-lite mkdir -p ${DESTDIR}/var/lib/shorewall6-lite
chmod 755 ${DESTDIR}/etc/shorewall6-lite chmod 755 ${DESTDIR}/etc/shorewall6-lite
@ -280,20 +280,20 @@ echo "Common functions linked through ${DESTDIR}/usr/share/shorewall6-lite/funct
# Install Shorecap # Install Shorecap
# #
install_file shorecap ${DESTDIR}/usr/${LIBEXEC}/shorewall6-lite/shorecap 0755 install_file shorecap ${DESTDIR}${LIBEXEC}/shorewall6-lite/shorecap 0755
echo echo
echo "Capability file builder installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall6-lite/shorecap" echo "Capability file builder installed in ${DESTDIR}${LIBEXEC}/shorewall6-lite/shorecap"
# #
# Install wait4ifup # Install wait4ifup
# #
if [ -f wait4ifup ]; then if [ -f wait4ifup ]; then
install_file wait4ifup ${DESTDIR}/usr/${LIBEXEC}/shorewall6-lite/wait4ifup 0755 install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall6-lite/wait4ifup 0755
echo echo
echo "wait4ifup installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall6-lite/wait4ifup" echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall6-lite/wait4ifup"
fi fi
# #

View File

@ -60,7 +60,7 @@ else
VERSION="" VERSION=""
fi fi
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
echo "Uninstalling Shorewall Lite $VERSION" echo "Uninstalling Shorewall Lite $VERSION"
@ -97,7 +97,7 @@ rm -rf /etc/shorewall6-lite-*.bkout
rm -rf /var/lib/shorewall6-lite rm -rf /var/lib/shorewall6-lite
rm -rf /var/lib/shorewall6-lite-*.bkout rm -rf /var/lib/shorewall6-lite-*.bkout
rm -rf /usr/share/shorewall6-lite rm -rf /usr/share/shorewall6-lite
rm -rf /usr/${LIBEXEC}/shorewall6-lite rm -rf ${LIBEXEC}/shorewall6-lite
rm -rf /usr/share/shorewall6-lite-*.bkout rm -rf /usr/share/shorewall6-lite-*.bkout
rm -f /etc/logrotate.d/shorewall6-lite rm -f /etc/logrotate.d/shorewall6-lite

View File

@ -110,8 +110,8 @@ MAC=
MANDIR=${MANDIR:-"/usr/share/man"} MANDIR=${MANDIR:-"/usr/share/man"}
SPARSE= SPARSE=
INSTALLD='-D' INSTALLD='-D'
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
[ -n "${PERLLIB:=share/shorewall}" ] [ -n "${PERLLIB:=/usr/share/shorewall}" ]
case $(uname) in case $(uname) in
CYGWIN*) CYGWIN*)
@ -228,8 +228,13 @@ fi
if [ -z "$CYGWIN" ]; then if [ -z "$CYGWIN" ]; then
install_file shorewall6 ${DESTDIR}/sbin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout install_file shorewall6 ${DESTDIR}/sbin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout
if [ -z "$MAC" ]; then
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6 eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall6 eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall6
else
eval sed -i -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6
eval sed -i -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall6
fi
echo "shorewall6 control program installed in ${DESTDIR}/sbin/shorewall6" echo "shorewall6 control program installed in ${DESTDIR}/sbin/shorewall6"
else else
install_file shorewall6 ${DESTDIR}/bin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout install_file shorewall6 ${DESTDIR}/bin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout
@ -258,8 +263,8 @@ fi
# Create /etc/shorewall, /usr/share/shorewall and /var/lib/shorewall6 if needed # Create /etc/shorewall, /usr/share/shorewall and /var/lib/shorewall6 if needed
# #
mkdir -p ${DESTDIR}/etc/shorewall6 mkdir -p ${DESTDIR}/etc/shorewall6
mkdir -p ${DESTDIR}/usr/${LIBEXEC}/shorewall6 mkdir -p ${DESTDIR}${LIBEXEC}/shorewall6
mkdir -p ${DESTDIR}/usr/${PERLLIB}/ mkdir -p ${DESTDIR}${PERLLIB}/
mkdir -p ${DESTDIR}/usr/share/shorewall6/configfiles mkdir -p ${DESTDIR}/usr/share/shorewall6/configfiles
mkdir -p ${DESTDIR}/var/lib/shorewall6 mkdir -p ${DESTDIR}/var/lib/shorewall6
@ -325,10 +330,10 @@ delete_file ${DESTDIR}/usr/share/shorewall6/prog.footer6
# Install wait4ifup # Install wait4ifup
# #
install_file wait4ifup ${DESTDIR}/usr/${LIBEXEC}/shorewall6/wait4ifup 0755 install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall6/wait4ifup 0755
echo echo
echo "wait4ifup installed in ${DESTDIR}/usr/${LIBEXEC}/shorewall6/wait4ifup" echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall6/wait4ifup"
# #
# Install the policy file # Install the policy file

View File

@ -239,7 +239,7 @@ startup_error() {
# Run the appropriate compiler # Run the appropriate compiler
# #
compiler() { compiler() {
pc=/usr/$g_libexec/shorewall/compiler.pl pc=$g_libexec/shorewall/compiler.pl
local command local command
command=$1 command=$1
@ -300,7 +300,7 @@ compiler() {
PERL=/usr/bin/perl PERL=/usr/bin/perl
fi fi
if [ $g_perllib = share/shorewall ]; then if [ $g_perllib = /usr/share/shorewall ]; then
$command $PERL $debugflags $pc $options $@ $command $PERL $debugflags $pc $options $@
else else
$command PERL5LIB=$g_perllib $PERL $debugflags $pc $options $@ $command PERL5LIB=$g_perllib $PERL $debugflags $pc $options $@
@ -1073,7 +1073,7 @@ reload_command() # $* = original arguments less the command.
local compiler local compiler
compiler= compiler=
local libexec local libexec
libexec=share libexec=/usr/share
litedir=/var/lib/shorewall6-lite litedir=/var/lib/shorewall6-lite
@ -1136,7 +1136,16 @@ reload_command() # $* = original arguments less the command.
temp=$(rsh_command /sbin/shorewall6-lite show config 2> /dev/null | grep ^LIBEXEC | sed 's/LIBEXEC is //') temp=$(rsh_command /sbin/shorewall6-lite show config 2> /dev/null | grep ^LIBEXEC | sed 's/LIBEXEC is //')
[ -n "$temp" ] && libexec=$temp if [ -n "$temp" ]; then
case $temp in
/*)
libexec="$temp"
;;
*)
libexec=/usr/$temp
;;
esac
fi
if [ -z "$getcaps" ]; then if [ -z "$getcaps" ]; then
SHOREWALL_DIR=$(resolve_file $directory) SHOREWALL_DIR=$(resolve_file $directory)
@ -1152,7 +1161,7 @@ reload_command() # $* = original arguments less the command.
fi fi
progress_message "Getting Capabilities on system $system..." progress_message "Getting Capabilities on system $system..."
if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IP6TABLES=$IP6TABLES /usr/$libexec/shorewall6-lite/shorecap" > $directory/capabilities; then if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IP6TABLES=$IP6TABLES $libexec/shorewall6-lite/shorecap" > $directory/capabilities; then
fatal_error "ERROR: Capturing capabilities on system $system failed" fatal_error "ERROR: Capturing capabilities on system $system failed"
fi fi
fi fi
@ -1494,7 +1503,7 @@ SHAREDIR=/usr/share/shorewall6
CONFDIR=/etc/shorewall6 CONFDIR=/etc/shorewall6
g_product="Shorewall6" g_product="Shorewall6"
g_recovering= g_recovering=
g_libexec=share g_libexec=/usr/share
g_perllib=share/shorewall g_perllib=share/shorewall
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir [ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir

View File

@ -72,7 +72,7 @@ else
VERSION="" VERSION=""
fi fi
[ -n "${LIBEXEC:=share}" ] [ -n "${LIBEXEC:=/usr/share}" ]
echo "Uninstalling shorewall6 $VERSION" echo "Uninstalling shorewall6 $VERSION"
@ -108,7 +108,7 @@ rm -rf /etc/shorewall6
rm -rf /etc/shorewall6-*.bkout rm -rf /etc/shorewall6-*.bkout
rm -rf /var/lib/shorewall6 rm -rf /var/lib/shorewall6
rm -rf /var/lib/shorewall6-*.bkout rm -rf /var/lib/shorewall6-*.bkout
rm -rf /usr/${LIBEXEC}/shorewall6 rm -rf ${LIBEXEC}/shorewall6
rm -rf /usr/share/shorewall6 rm -rf /usr/share/shorewall6
rm -rf /usr/share/shorewall6-*.bkout rm -rf /usr/share/shorewall6-*.bkout
rm -rf /usr/share/man/man5/shorewall6* rm -rf /usr/share/man/man5/shorewall6*