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
|
error_message() # $* = Error Message
|
||||||
{
|
{
|
||||||
echo " $@" >&2
|
echo " $@" >&2
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -17,7 +17,7 @@ usage() {
|
|||||||
echo " reset"
|
echo " reset"
|
||||||
echo " refresh"
|
echo " refresh"
|
||||||
echo " restart"
|
echo " restart"
|
||||||
echo " run <function> [ <argument> ... ]"
|
echo " run <command> [ <parameter> ... ]"
|
||||||
echo " status"
|
echo " status"
|
||||||
echo " up <interface>"
|
echo " up <interface>"
|
||||||
echo " version"
|
echo " version"
|
||||||
@ -373,10 +373,14 @@ case "$COMMAND" in
|
|||||||
status=0
|
status=0
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
shift
|
if [ $# -gt 1 ]; then
|
||||||
detect_configuration
|
shift
|
||||||
eval $@
|
detect_configuration
|
||||||
status=$?
|
eval $@
|
||||||
|
status=$?
|
||||||
|
else
|
||||||
|
error_message "ERROR: Missing command"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
version)
|
version)
|
||||||
[ $# -ne 1 ] && usage 2
|
[ $# -ne 1 ] && usage 2
|
||||||
|
Loading…
Reference in New Issue
Block a user