mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
scripts/devnet: print usage if no arguments are provided
Before:
$ sudo ./scripts/devnet
./scripts/devnet: line 20: $1: unbound variable
After:
$ sudo ./scripts/devnet
USAGE: devnet <command>
Commands:
create create bootcfg and PXE services on the bridge
destroy destroy the services on the bridge
This commit is contained in:
@@ -17,6 +17,10 @@ if [ "$EUID" -ne 0 ]
|
||||
fi
|
||||
|
||||
function main {
|
||||
if [ "$#" -ne 1 ]; then
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
case "$1" in
|
||||
"create") create;;
|
||||
"destroy") destroy;;
|
||||
|
||||
Reference in New Issue
Block a user