From 863a33ed0aafab5a6685d4f8200e3ff878ba5075 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 13 Apr 2007 01:02:03 +0000 Subject: [PATCH] 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 --- Shorewall-common/shorewall | 114 ++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/Shorewall-common/shorewall b/Shorewall-common/shorewall index 0e39ed6e9..1c1f4ddfe 100755 --- a/Shorewall-common/shorewall +++ b/Shorewall-common/shorewall @@ -350,6 +350,12 @@ start_command() { finished=1 option= ;; + C) + [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$2 + option= + shift + ;; f*) FAST=Yes option=${option#f} @@ -452,17 +458,15 @@ compile_command() { EXPORT=Yes option=${option#e} ;; - P*) - PROFILE=Yes - option=${option#P} - ;; p*) - SHOREWALL_COMPILER=perl + PROFILE=Yes option=${option#p} ;; - s*) - SHOREWALL_COMPILER=shell - option=${option#s} + C) + [ $# -gt 0 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$1 + option= + shift ;; d*) DEBUG=Yes; @@ -539,17 +543,9 @@ check_command() { EXPORT=Yes option=${option#e} ;; - P*) - PROFILE=Yes - option=${option#P} - ;; p*) - SHOREWALL_COMPILER=perl - option=${option#p} - ;; - s*) - SHOREWALL_COMPILER=shell - option=${option#s} + PROFILE=Yes + option=${option#d} ;; d*) DEBUG=Yes; @@ -619,13 +615,11 @@ restart_command() { NOROUTES=Yes option=${option#n} ;; - p*) - SHOREWALL_COMPILER=perl - option=${option#p} - ;; - s*) - SHOREWALL_COMPILER=shell - option=${option#s} + C) + [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$2 + option= + shift ;; *) usage 1 @@ -704,13 +698,11 @@ refresh_command() { finished=1 option= ;; - p*) - SHOREWALL_COMPILER=perl - option=${option#p} - ;; - s*) - SHOREWALL_COMPILER=shell - option=${option#s} + C) + [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$2 + option= + shift ;; *) usage 1 @@ -789,13 +781,11 @@ safe_commands() { NOROUTES=Yes option=${option#n} ;; - p*) - SHOREWALL_COMPILER=perl - option=${option#p} - ;; - s*) - SHOREWALL_COMPILER=shell - option=${option#s} + C) + [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$2 + option= + shift ;; *) usage 1 @@ -941,13 +931,11 @@ try_command() { NOROUTES=Yes option=${option#n} ;; - p*) - SHOREWALL_COMPILER=perl - option=${option#p} - ;; - s*) - SHOREWALL_COMPILER=shell - option=${option#s} + C) + [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$2 + option= + shift ;; *) usage 1 @@ -1070,6 +1058,12 @@ reload_command() # $* = original arguments less the command. option= shift ;; + C) + [ $# -gt 1 ] || { error_message "ERROR: -C must be followed by a compiler name"; exit 1; } + SHOREWALL_COMPILER=$2 + option= + shift + ;; *) usage 1 ;; @@ -1165,6 +1159,12 @@ export_command() # $* = original arguments less the command. finished=1 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\"" ;; @@ -1219,38 +1219,38 @@ usage() # $1 = exit status echo "where is one of:" echo " add [:] ... " echo " allow
..." - echo " check [ -e ] [ ]" + echo " check [ -e ] [ -C {shell|perl} ] [ ]" echo " clear" - echo " compile [ -e ] [ ] " + echo " compile [ -e ] [ -C {shell|perl} ] [ ] " echo " delete [:] ... " echo " drop
..." echo " dump [ -x ]" - echo " export [ ] [@][:]" + echo " export [ -C {shell|perl} ] [ ] [@][:]" echo " forget [ ]" echo " help" echo " hits" echo " ipcalc {
/ |
}" echo " ipdecimal {
| }" echo " iprange
-
" - echo " load [ -s ] [ -c ] [ -r ] [ ] " + echo " load [ -s ] [ -c ] [ -r ] [ -C {shell|perl} ] [ ] " echo " logdrop
..." echo " logreject
..." echo " logwatch []" - echo " refresh" + echo " refresh [ -C {shell|perl} ]" echo " reject
..." - echo " reload [ -s ] [ -c ] [ -r ] [ ] " + echo " reload [ -s ] [ -c ] [ -r ] [ -C {shell|perl} ] [ ] " echo " reset" - echo " restart [ -n ] [ ]" + echo " restart [ -n ] [ -C {shell|perl} ] [ ]" echo " restore [ -n ] [ ]" echo " save [ ]" echo " show [ -x ] [ -m ] [-f] [ -t {filter|mangle|nat} ] [ [ ... ]|actions|capabilities|classifiers|config|connections|ip|log|macros|mangle|nat|routing|tc|zones]" - echo " start [ -f ] [ -n ] [ ]" + echo " start [ -f ] [ -n ] [ -C {shell|perl} ] [ ]" echo " stop" echo " status" - echo " try [ ]" + echo " try [ -C {shell|perl} ] [ ]" echo " version" - echo " safe-start [ ]" - echo " safe-restart [ ]" + echo " safe-start [ -C {shell|perl} ] [ ]" + echo " safe-restart [ -C {shell|perl} ] [ ]" echo exit $1 }