forked from extern/shorewall_code
Correct install scripts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b00e20d4d0
commit
5f37b5bde6
@ -59,7 +59,6 @@ mywhich() {
|
|||||||
|
|
||||||
for dir in $(split $PATH); do
|
for dir in $(split $PATH); do
|
||||||
if [ -x $dir/$1 ]; then
|
if [ -x $dir/$1 ]; then
|
||||||
echo $dir/$1
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -175,6 +174,8 @@ 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 "$BUILD" ] || BUILD=$HOST
|
||||||
|
|
||||||
if [ -z "$BUILD" ]; then
|
if [ -z "$BUILD" ]; then
|
||||||
case $(uname) in
|
case $(uname) in
|
||||||
cygwin*)
|
cygwin*)
|
||||||
@ -194,9 +195,6 @@ if [ -z "$BUILD" ]; then
|
|||||||
debian)
|
debian)
|
||||||
BUILD=debian
|
BUILD=debian
|
||||||
;;
|
;;
|
||||||
gentoo)
|
|
||||||
BUILD=gentoo
|
|
||||||
;;
|
|
||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
@ -459,8 +457,12 @@ if [ -z "$DESTDIR" ]; then
|
|||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
elif rc-update add $PRODUCT default; then
|
elif mywhich update-rc.d ; then
|
||||||
echo "Shorewall Init will start automatically at boot"
|
if update-rc.d $PRODUCT enable; then
|
||||||
|
echo "$PRODUCT will start automatically at boot"
|
||||||
|
echo "Set startup=1 in ${CONFDIR}/default/$PRODUCT to enable"
|
||||||
|
else
|
||||||
|
cant_autostart
|
||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
|
@ -552,6 +552,12 @@ if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
|||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
|
elif mywhich update-rc.d ; then
|
||||||
|
echo "$PRODUCT will start automatically at boot"
|
||||||
|
echo "Set startup=1 in ${CONFDIR}/default/$PRODUCT to enable"
|
||||||
|
touch /var/log/$PRODUCT-init.log
|
||||||
|
perl -p -w -i -e 's/^STARTUP_ENABLED=No/STARTUP_ENABLED=Yes/;s/^IP_FORWARDING=On/IP_FORWARDING=Keep/;s/^SUBSYSLOCK=.*/SUBSYSLOCK=/;' ${CONFDIR}/$PRODUCT/$PRODUCT.conf
|
||||||
|
update-rc.d $PRODUCT enable
|
||||||
elif mywhich rc-update ; then
|
elif mywhich rc-update ; then
|
||||||
if rc-update add $PRODUCT default; then
|
if rc-update add $PRODUCT default; then
|
||||||
echo "$PRODUCT will start automatically at boot"
|
echo "$PRODUCT will start automatically at boot"
|
||||||
|
@ -1193,6 +1193,12 @@ if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
|||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
|
elif mywhich update-rc.d ; then
|
||||||
|
echo "$PRODUCT will start automatically at boot"
|
||||||
|
echo "Set startup=1 in ${CONFDIR}/default/$PRODUCT to enable"
|
||||||
|
touch /var/log/$PRODUCT-init.log
|
||||||
|
perl -p -w -i -e 's/^STARTUP_ENABLED=No/STARTUP_ENABLED=Yes/;s/^IP_FORWARDING=On/IP_FORWARDING=Keep/;s/^SUBSYSLOCK=.*/SUBSYSLOCK=/;' ${CONFDIR}/$PRODUCT/$PRODUCT.conf
|
||||||
|
update-rc.d $PRODUCT enable
|
||||||
elif mywhich rc-update ; then
|
elif mywhich rc-update ; then
|
||||||
if rc-update add $PRODUCT default; then
|
if rc-update add $PRODUCT default; then
|
||||||
echo "$PRODUCT will start automatically at boot"
|
echo "$PRODUCT will start automatically at boot"
|
||||||
|
Loading…
Reference in New Issue
Block a user