mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Detect missing <commmand> in the generated scrip
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4e9a0b989d
commit
0bf80c15d8
@ -172,6 +172,7 @@ run_it() {
|
||||
error_message() # $* = Error Message
|
||||
{
|
||||
echo " $@" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -17,7 +17,7 @@ usage() {
|
||||
echo " reset"
|
||||
echo " refresh"
|
||||
echo " restart"
|
||||
echo " run <function> [ <argument> ... ]"
|
||||
echo " run <command> [ <parameter> ... ]"
|
||||
echo " status"
|
||||
echo " up <interface>"
|
||||
echo " version"
|
||||
@ -373,10 +373,14 @@ case "$COMMAND" in
|
||||
status=0
|
||||
;;
|
||||
run)
|
||||
shift
|
||||
detect_configuration
|
||||
eval $@
|
||||
status=$?
|
||||
if [ $# -gt 1 ]; then
|
||||
shift
|
||||
detect_configuration
|
||||
eval $@
|
||||
status=$?
|
||||
else
|
||||
error_message "ERROR: Missing command"
|
||||
fi
|
||||
;;
|
||||
version)
|
||||
[ $# -ne 1 ] && usage 2
|
||||
|
Loading…
Reference in New Issue
Block a user