summaryrefslogtreecommitdiffstats
path: root/ctdb/tools/onnode
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2011-05-17 13:25:08 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2011-06-08 14:22:16 +1000
commitf3ea7bec681ca68917903882da7332756d6eafa4 (patch)
tree4fb6961264b4085faecb311335c75d2076820db0 /ctdb/tools/onnode
parent350f3e5b09edf14a8b2ba94d8a8c1dd3329eae26 (diff)
downloadsamba-f3ea7bec681ca68917903882da7332756d6eafa4.tar.gz
samba-f3ea7bec681ca68917903882da7332756d6eafa4.tar.xz
samba-f3ea7bec681ca68917903882da7332756d6eafa4.zip
onnode: Exit with error for unknown command-line flags.
Use of "local" was masking errors in command-line processing. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ca80adda7517b43147ef30156ae34c66b29fa2bd)
Diffstat (limited to 'ctdb/tools/onnode')
-rwxr-xr-xctdb/tools/onnode4
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode
index 7e1b0cac83..77a1207d6c 100755
--- a/ctdb/tools/onnode
+++ b/ctdb/tools/onnode
@@ -70,7 +70,9 @@ parse_options ()
# $POSIXLY_CORRECT means that the command passed to onnode can
# take options and getopt won't reorder things to make them
# options ot onnode.
- local temp=$(POSIXLY_CORRECT=1 getopt -n "$prog" -o "cf:hno:pqv" -l help -- "$@")
+ local temp
+ # Not on the previous line - local returns 0!
+ temp=$(POSIXLY_CORRECT=1 getopt -n "$prog" -o "cf:hno:pqv" -l help -- "$@")
[ $? != 0 ] && usage