Browse Source

Added to local patch prevention for running vbladed with wrong number of parameters.

David Martínez Moreno 12 years ago
parent
commit
202230b72e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      vbladed

+ 3 - 2
vbladed

@@ -5,8 +5,9 @@
 
 # Although logging goes to syslog, let's going to
 # protect ourselves against the most common way or
-# calling vbladed: without arguments.
-if [ -z "$*" ]
+# calling vbladed: without arguments.  While at it, we guard
+# ourselves against wrong number of parameters.
+if [ $# -ne 4 ]
 then
     echo "usage: ./vblade <shelf> <slot> <ethn> <device>" >&2
     exit 1