Change compiler selection to use '-C {shell|perl}'

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5913 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-04-13 01:02:03 +00:00
parent 8df919728b
commit 863a33ed0a

View File

@ -350,6 +350,12 @@ start_command() {
finished=1 finished=1
option= option=
;; ;;
C)
[ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
SHOREWALL_COMPILER=$2
option=
shift
;;
f*) f*)
FAST=Yes FAST=Yes
option=${option#f} option=${option#f}
@ -452,17 +458,15 @@ compile_command() {
EXPORT=Yes EXPORT=Yes
option=${option#e} option=${option#e}
;; ;;
P*)
PROFILE=Yes
option=${option#P}
;;
p*) p*)
SHOREWALL_COMPILER=perl PROFILE=Yes
option=${option#p} option=${option#p}
;; ;;
s*) C)
SHOREWALL_COMPILER=shell [ $# -gt 0 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
option=${option#s} SHOREWALL_COMPILER=$1
option=
shift
;; ;;
d*) d*)
DEBUG=Yes; DEBUG=Yes;
@ -539,17 +543,9 @@ check_command() {
EXPORT=Yes EXPORT=Yes
option=${option#e} option=${option#e}
;; ;;
P*)
PROFILE=Yes
option=${option#P}
;;
p*) p*)
SHOREWALL_COMPILER=perl PROFILE=Yes
option=${option#p} option=${option#d}
;;
s*)
SHOREWALL_COMPILER=shell
option=${option#s}
;; ;;
d*) d*)
DEBUG=Yes; DEBUG=Yes;
@ -619,13 +615,11 @@ restart_command() {
NOROUTES=Yes NOROUTES=Yes
option=${option#n} option=${option#n}
;; ;;
p*) C)
SHOREWALL_COMPILER=perl [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
option=${option#p} SHOREWALL_COMPILER=$2
;; option=
s*) shift
SHOREWALL_COMPILER=shell
option=${option#s}
;; ;;
*) *)
usage 1 usage 1
@ -704,13 +698,11 @@ refresh_command() {
finished=1 finished=1
option= option=
;; ;;
p*) C)
SHOREWALL_COMPILER=perl [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
option=${option#p} SHOREWALL_COMPILER=$2
;; option=
s*) shift
SHOREWALL_COMPILER=shell
option=${option#s}
;; ;;
*) *)
usage 1 usage 1
@ -789,13 +781,11 @@ safe_commands() {
NOROUTES=Yes NOROUTES=Yes
option=${option#n} option=${option#n}
;; ;;
p*) C)
SHOREWALL_COMPILER=perl [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
option=${option#p} SHOREWALL_COMPILER=$2
;; option=
s*) shift
SHOREWALL_COMPILER=shell
option=${option#s}
;; ;;
*) *)
usage 1 usage 1
@ -941,13 +931,11 @@ try_command() {
NOROUTES=Yes NOROUTES=Yes
option=${option#n} option=${option#n}
;; ;;
p*) C)
SHOREWALL_COMPILER=perl [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
option=${option#p} SHOREWALL_COMPILER=$2
;; option=
s*) shift
SHOREWALL_COMPILER=shell
option=${option#s}
;; ;;
*) *)
usage 1 usage 1
@ -1070,6 +1058,12 @@ reload_command() # $* = original arguments less the command.
option= option=
shift shift
;; ;;
C)
[ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
SHOREWALL_COMPILER=$2
option=
shift
;;
*) *)
usage 1 usage 1
;; ;;
@ -1165,6 +1159,12 @@ export_command() # $* = original arguments less the command.
finished=1 finished=1
option= option=
;; ;;
C)
[ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; }
SHOREWALL_COMPILER=$2
option=
shift
;;
*) *)
fatal_error "Unrecognized option \"$option\"" fatal_error "Unrecognized option \"$option\""
;; ;;
@ -1219,38 +1219,38 @@ usage() # $1 = exit status
echo "where <command> is one of:" echo "where <command> is one of:"
echo " add <interface>[:<host-list>] ... <zone>" echo " add <interface>[:<host-list>] ... <zone>"
echo " allow <address> ..." echo " allow <address> ..."
echo " check [ -e ] [ <directory> ]" echo " check [ -e ] [ -C {shell|perl} ] [ <directory> ]"
echo " clear" echo " clear"
echo " compile [ -e ] [ <directory name> ] <path name>" echo " compile [ -e ] [ -C {shell|perl} ] [ <directory name> ] <path name>"
echo " delete <interface>[:<host-list>] ... <zone>" echo " delete <interface>[:<host-list>] ... <zone>"
echo " drop <address> ..." echo " drop <address> ..."
echo " dump [ -x ]" echo " dump [ -x ]"
echo " export [ <directory1> ] [<user>@]<system>[:<directory2>]" echo " export [ -C {shell|perl} ] [ <directory1> ] [<user>@]<system>[:<directory2>]"
echo " forget [ <file name> ]" echo " forget [ <file name> ]"
echo " help" echo " help"
echo " hits" echo " hits"
echo " ipcalc { <address>/<vlsm> | <address> <netmask> }" echo " ipcalc { <address>/<vlsm> | <address> <netmask> }"
echo " ipdecimal { <address> | <integer> }" echo " ipdecimal { <address> | <integer> }"
echo " iprange <address>-<address>" echo " iprange <address>-<address>"
echo " load [ -s ] [ -c ] [ -r <root user> ] [ <directory> ] <system>" echo " load [ -s ] [ -c ] [ -r <root user> ] [ -C {shell|perl} ] [ <directory> ] <system>"
echo " logdrop <address> ..." echo " logdrop <address> ..."
echo " logreject <address> ..." echo " logreject <address> ..."
echo " logwatch [<refresh interval>]" echo " logwatch [<refresh interval>]"
echo " refresh" echo " refresh [ -C {shell|perl} ]"
echo " reject <address> ..." echo " reject <address> ..."
echo " reload [ -s ] [ -c ] [ -r <root user> ] [ <directory> ] <system>" echo " reload [ -s ] [ -c ] [ -r <root user> ] [ -C {shell|perl} ] [ <directory> ] <system>"
echo " reset" echo " reset"
echo " restart [ -n ] [ <directory> ]" echo " restart [ -n ] [ -C {shell|perl} ] [ <directory> ]"
echo " restore [ -n ] [ <file name> ]" echo " restore [ -n ] [ <file name> ]"
echo " save [ <file name> ]" echo " save [ <file name> ]"
echo " show [ -x ] [ -m ] [-f] [ -t {filter|mangle|nat} ] [<chain> [ <chain> ... ]|actions|capabilities|classifiers|config|connections|ip|log|macros|mangle|nat|routing|tc|zones]" echo " show [ -x ] [ -m ] [-f] [ -t {filter|mangle|nat} ] [<chain> [ <chain> ... ]|actions|capabilities|classifiers|config|connections|ip|log|macros|mangle|nat|routing|tc|zones]"
echo " start [ -f ] [ -n ] [ <directory> ]" echo " start [ -f ] [ -n ] [ -C {shell|perl} ] [ <directory> ]"
echo " stop" echo " stop"
echo " status" echo " status"
echo " try <directory> [ <timeout> ]" echo " try [ -C {shell|perl} ] <directory> [ <timeout> ]"
echo " version" echo " version"
echo " safe-start [ <directory> ]" echo " safe-start [ -C {shell|perl} ] [ <directory> ]"
echo " safe-restart [ <directory> ]" echo " safe-restart [ -C {shell|perl} ] [ <directory> ]"
echo echo
exit $1 exit $1
} }