debian: Avoid aborting on switch startup when $COMMANDS is empty.
authorBen Pfaff <blp@nicira.com>
Mon, 19 Jan 2009 23:54:22 +0000 (15:54 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 19 Jan 2009 23:54:43 +0000 (15:54 -0800)
debian/openflow-switch.init

index fa17d2bafc3d93af00d2aad5028ce59e970a5201..f4571b2a04cc430d291cc9bd5f906c505bc60be4 100755 (executable)
@@ -269,7 +269,7 @@ case "$1" in
 
         COMMAND_OPT=
         if test -n "$COMMANDS"; then
-            COMMAND_OPT="--command-acl=$COMMANDS"
+            COMMAND_OPT="--command-acl='$COMMANDS'"
         fi
 
         if test "$MODE" = out-of-band; then
@@ -284,7 +284,7 @@ case "$1" in
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
            --exec $DAEMON -- nl:0 $CONTROLLER --detach --pidfile=$PIDFILE \
             --verbose=ANY:console:emer --verbose=ANY:syslog:err --log-file \
-            $DAEMON_OPTS $MGMT_OPTS $MONITOR_OPT $SSL_OPTS "$COMMAND_OPT"
+            $DAEMON_OPTS $MGMT_OPTS $MONITOR_OPT $SSL_OPTS $COMMAND_OPT
         if running; then
             echo "$NAME."
         else