Add --monitor flag to default init scripts for secchan.
authorJustin Pettit <jpettit@nicira.com>
Thu, 6 Nov 2008 20:42:07 +0000 (12:42 -0800)
committerJustin Pettit <jpettit@nicira.com>
Thu, 6 Nov 2008 20:42:07 +0000 (12:42 -0800)
debian/openflow-switch.default
debian/openflow-switch.init

index 32761eb..9529ddf 100644 (file)
@@ -98,9 +98,13 @@ SWITCH_IP=dhcp
 # MGMT_VCONNS: List of vconns (space-separated) on which secchan
 # should listen for management connections from dpctl, etc.
 # openflow-switchui by default connects to
-# unix:/var/run/secchan.socket, so do not disable this if you want to
+# unix:/var/run/secchan.mgmt, so do not disable this if you want to
 # use openflow-switchui.
-MGMT_VCONNS="punix:/var/run/secchan.socket"
+MGMT_VCONNS="punix:/var/run/secchan.mgmt"
+
+# MONITOR_VCONN:  Name of vconn on which secchan should listen for 
+# monitoring connections from dpctl.
+MONITOR_VCONN="punix:/var/run/secchan.monitor"
 
 # COMMANDS: Access control list for the commands that can be executed
 # remotely over the OpenFlow protocol, as a comma-separated list of
index fcac21f..86a018c 100755 (executable)
@@ -247,6 +247,11 @@ case "$1" in
             MGMT_OPTS="$MGMT_OPTS --listen=$vconn"
         done
 
+        MONITOR_OPT=
+        if test -n "$MONITOR_VCONN"; then
+            MONITOR_OPT="--monitor=$MONITOR_VCONN"
+        fi
+
         COMMAND_OPT=
         if test -n "$COMMANDS"; then
             COMMAND_OPT="--command-acl=$COMMANDS"
@@ -264,7 +269,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 $SSL_OPTS "$COMMAND_OPT"
+            $DAEMON_OPTS $MGMT_OPTS $MONITOR_OPT $SSL_OPTS "$COMMAND_OPT"
         if running; then
             echo "$NAME."
         else