mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
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 "usage: $ME [ <configuration-file> ]"
|
||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
|
echo " $ME -n"
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,6 +106,7 @@ PRODUCT=shorewall-init
|
|||||||
T='-T'
|
T='-T'
|
||||||
|
|
||||||
finished=0
|
finished=0
|
||||||
|
configure=1
|
||||||
|
|
||||||
while [ $finished -eq 0 ] ; do
|
while [ $finished -eq 0 ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -120,6 +122,10 @@ while [ $finished -eq 0 ] ; do
|
|||||||
echo "Shorewall-init Firewall Installer Version $VERSION"
|
echo "Shorewall-init Firewall Installer Version $VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
n*)
|
||||||
|
configure=0
|
||||||
|
option=${option#n}
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
@ -453,7 +459,7 @@ case $HOST in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -z "$DESTDIR" ]; then
|
if [ -z "$DESTDIR" ]; then
|
||||||
if [ -n "$first_install" ]; then
|
if [ $configure -eq 1 -a -n "$first_install" ]; then
|
||||||
if [ $HOST = debian ]; then
|
if [ $HOST = debian ]; then
|
||||||
if mywhich insserv; then
|
if mywhich insserv; then
|
||||||
if insserv ${INITDIR}/shorewall-init; then
|
if insserv ${INITDIR}/shorewall-init; then
|
||||||
@ -505,7 +511,7 @@ if [ -z "$DESTDIR" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -n "$first_install" ]; then
|
if [ $configure -eq 1 -a -n "$first_install" ]; then
|
||||||
if [ $HOST = debian ]; then
|
if [ $HOST = debian ]; then
|
||||||
if [ -n "${DESTDIR}" ]; then
|
if [ -n "${DESTDIR}" ]; then
|
||||||
mkdir -p ${DESTDIR}/etc/rcS.d
|
mkdir -p ${DESTDIR}/etc/rcS.d
|
||||||
|
@ -30,6 +30,7 @@ usage() # $1 = exit status
|
|||||||
echo "usage: $ME [ <configuration-file> ]"
|
echo "usage: $ME [ <configuration-file> ]"
|
||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
|
echo " $ME -n"
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,6 +114,7 @@ fi
|
|||||||
# Parse the run line
|
# Parse the run line
|
||||||
#
|
#
|
||||||
finished=0
|
finished=0
|
||||||
|
configure=1
|
||||||
|
|
||||||
while [ $finished -eq 0 ] ; do
|
while [ $finished -eq 0 ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -128,6 +130,10 @@ while [ $finished -eq 0 ] ; do
|
|||||||
echo "$Product Firewall Installer Version $VERSION"
|
echo "$Product Firewall Installer Version $VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
n*)
|
||||||
|
configure=0
|
||||||
|
option=${option#n}
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
@ -527,7 +533,7 @@ if [ ${SHAREDIR} != /usr/share ]; then
|
|||||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
||||||
fi
|
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 [ -n "$SYSTEMD" ]; then
|
||||||
if systemctl enable ${PRODUCT}.service; then
|
if systemctl enable ${PRODUCT}.service; then
|
||||||
echo "$Product will start automatically at boot"
|
echo "$Product will start automatically at boot"
|
||||||
|
@ -35,6 +35,7 @@ usage() # $1 = exit status
|
|||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
echo " $ME -s"
|
echo " $ME -s"
|
||||||
echo " $ME -a"
|
echo " $ME -a"
|
||||||
|
echo " $ME -n"
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +119,7 @@ T="-T"
|
|||||||
INSTALLD='-D'
|
INSTALLD='-D'
|
||||||
|
|
||||||
finished=0
|
finished=0
|
||||||
|
configure=1
|
||||||
|
|
||||||
while [ $finished -eq 0 ]; do
|
while [ $finished -eq 0 ]; do
|
||||||
option=$1
|
option=$1
|
||||||
@ -147,6 +149,10 @@ while [ $finished -eq 0 ]; do
|
|||||||
ANNOTATED=
|
ANNOTATED=
|
||||||
option=${option#p}
|
option=${option#p}
|
||||||
;;
|
;;
|
||||||
|
n*)
|
||||||
|
configure=0
|
||||||
|
option=${option#n}
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
@ -1167,7 +1173,7 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR
|
|||||||
echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
|
echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
|
||||||
fi
|
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 [ -n "$SYSTEMD" ]; then
|
||||||
if systemctl enable ${PRODUCT}.service; then
|
if systemctl enable ${PRODUCT}.service; then
|
||||||
echo "$Product will start automatically at boot"
|
echo "$Product will start automatically at boot"
|
||||||
|
Loading…
Reference in New Issue
Block a user