forked from extern/shorewall_code
Implement the -n option in the installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
483ea3e437
commit
8a5e71a56f
@ -35,6 +35,7 @@ usage() # $1 = exit status
|
||||
echo "usage: $ME [ <configuration-file> ]"
|
||||
echo " $ME -v"
|
||||
echo " $ME -h"
|
||||
echo " $ME -n"
|
||||
exit $1
|
||||
}
|
||||
|
||||
@ -105,6 +106,7 @@ PRODUCT=shorewall-init
|
||||
T='-T'
|
||||
|
||||
finished=0
|
||||
configure=1
|
||||
|
||||
while [ $finished -eq 0 ] ; do
|
||||
case "$1" in
|
||||
@ -120,6 +122,10 @@ while [ $finished -eq 0 ] ; do
|
||||
echo "Shorewall-init Firewall Installer Version $VERSION"
|
||||
exit 0
|
||||
;;
|
||||
n*)
|
||||
configure=0
|
||||
option=${option#n}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
@ -453,7 +459,7 @@ case $HOST in
|
||||
esac
|
||||
|
||||
if [ -z "$DESTDIR" ]; then
|
||||
if [ -n "$first_install" ]; then
|
||||
if [ $configure -eq 1 -a -n "$first_install" ]; then
|
||||
if [ $HOST = debian ]; then
|
||||
if mywhich insserv; then
|
||||
if insserv ${INITDIR}/shorewall-init; then
|
||||
@ -505,7 +511,7 @@ if [ -z "$DESTDIR" ]; then
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ -n "$first_install" ]; then
|
||||
if [ $configure -eq 1 -a -n "$first_install" ]; then
|
||||
if [ $HOST = debian ]; then
|
||||
if [ -n "${DESTDIR}" ]; then
|
||||
mkdir -p ${DESTDIR}/etc/rcS.d
|
||||
|
@ -30,6 +30,7 @@ usage() # $1 = exit status
|
||||
echo "usage: $ME [ <configuration-file> ]"
|
||||
echo " $ME -v"
|
||||
echo " $ME -h"
|
||||
echo " $ME -n"
|
||||
exit $1
|
||||
}
|
||||
|
||||
@ -113,6 +114,7 @@ fi
|
||||
# Parse the run line
|
||||
#
|
||||
finished=0
|
||||
configure=1
|
||||
|
||||
while [ $finished -eq 0 ] ; do
|
||||
case "$1" in
|
||||
@ -128,6 +130,10 @@ while [ $finished -eq 0 ] ; do
|
||||
echo "$Product Firewall Installer Version $VERSION"
|
||||
exit 0
|
||||
;;
|
||||
n*)
|
||||
configure=0
|
||||
option=${option#n}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
@ -527,7 +533,7 @@ if [ ${SHAREDIR} != /usr/share ]; then
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
||||
fi
|
||||
|
||||
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||
if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||
if [ -n "$SYSTEMD" ]; then
|
||||
if systemctl enable ${PRODUCT}.service; then
|
||||
echo "$Product will start automatically at boot"
|
||||
|
@ -35,6 +35,7 @@ usage() # $1 = exit status
|
||||
echo " $ME -h"
|
||||
echo " $ME -s"
|
||||
echo " $ME -a"
|
||||
echo " $ME -n"
|
||||
exit $1
|
||||
}
|
||||
|
||||
@ -118,6 +119,7 @@ T="-T"
|
||||
INSTALLD='-D'
|
||||
|
||||
finished=0
|
||||
configure=1
|
||||
|
||||
while [ $finished -eq 0 ]; do
|
||||
option=$1
|
||||
@ -147,6 +149,10 @@ while [ $finished -eq 0 ]; do
|
||||
ANNOTATED=
|
||||
option=${option#p}
|
||||
;;
|
||||
n*)
|
||||
configure=0
|
||||
option=${option#n}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
@ -1167,7 +1173,7 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR
|
||||
echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
|
||||
fi
|
||||
|
||||
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||
if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||
if [ -n "$SYSTEMD" ]; then
|
||||
if systemctl enable ${PRODUCT}.service; then
|
||||
echo "$Product will start automatically at boot"
|
||||
|
Loading…
Reference in New Issue
Block a user