Redefine the -i option

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep
2013-12-15 11:23:20 -08:00
parent 6d72cb3138
commit 4e4e7cac1d
4 changed files with 186 additions and 141 deletions

View File

@ -529,6 +529,10 @@ start_command() {
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
*)
usage 1
;;
@ -643,6 +647,10 @@ compile_command() {
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
-)
finished=1
option=
@ -733,6 +741,10 @@ check_command() {
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
*)
usage 1
;;
@ -813,6 +825,10 @@ update_command() {
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
a*)
g_annotate=Yes
option=${option#a}
@ -825,10 +841,6 @@ update_command() {
g_directives=Yes
option=${option#D}
;;
i*)
g_inline=Yes
option=${option#i}
;;
*)
usage 1
;;
@ -915,6 +927,10 @@ restart_command() {
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
*)
usage 1
;;
@ -1010,6 +1026,10 @@ refresh_command() {
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
D)
if [ $# -gt 1 ]; then
g_shorewalldir="$2"
@ -1399,6 +1419,10 @@ reload_command() # $* = original arguments less the command.
g_confess=Yes
option=${option#T}
;;
i*)
g_inline=Yes
option=${option#i}
;;
*)
usage 1
;;
@ -1588,9 +1612,9 @@ usage() # $1 = exit status
echo "where <command> is one of:"
echo " add <interface>[:<host-list>] ... <zone>"
echo " allow <address> ..."
echo " [ check | ck ] [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ <directory> ]"
echo " [ check | ck ] [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ -i ] [ <directory> ]"
echo " clear"
echo " [ compile | co ] [ -e ] [ -p ] [ -t ] [ -c ] [ -d ] [ -T ] [ <directory name> ] [ <path name> ]"
echo " [ compile | co ] [ -e ] [ -p ] [ -t ] [ -c ] [ -d ] [ -T ] [ -i ] [ <directory name> ] [ <path name> ]"
echo " delete <interface>[:<host-list>] ... <zone>"
echo " disable <interface>"
echo " drop <address> ..."
@ -1613,7 +1637,7 @@ usage() # $1 = exit status
echo " iptrace <ip6tables match expression>"
fi
echo " load [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ <directory> ] <system>"
echo " load [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ -i ] [ <directory> ] <system>"
echo " logdrop <address> ..."
echo " logreject <address> ..."
echo " logwatch [<refresh interval>]"
@ -1626,9 +1650,9 @@ usage() # $1 = exit status
echo " refresh [ -d ] [ -n ] [ -T ] [ -D <directory> ] [ <chain>... ]"
echo " reject <address> ..."
echo " reload [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ <directory> ] <system>"
echo " reload [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ -i ] [ <directory> ] <system>"
echo " reset [ <chain> ... ]"
echo " restart [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ <directory> ]"
echo " restart [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ -i ] [ <directory> ]"
echo " restore [ -n ] [ <file name> ]"
echo " safe-restart [ -t <timeout> ] [ <directory> ]"
echo " safe-start [ -t <timeout> ] [ <directory> ]"
@ -1658,11 +1682,11 @@ usage() # $1 = exit status
echo " [ show | list | ls ] tc [ device ]"
echo " [ show | list | ls ] vardir"
echo " [ show | list | ls ] zones"
echo " start [ -f ] [ -n ] [ -p ] [ -c ] [ -T ] [ <directory> ]"
echo " start [ -f ] [ -n ] [ -p ] [ -c ] [ -T ] [ -i ] [ <directory> ]"
echo " status"
echo " stop"
echo " try <directory> [ <timeout> ]"
echo " update [ -a ] [ -b ] [ -r ] [ -T ] [ -D ] [ <directory> ]"
echo " update [ -a ] [ -b ] [ -r ] [ -T ] [ -D ] [ -i ] [ <directory> ]"
echo " version [ -a ]"
echo
exit $1