]> git.ipfire.org Git - people/ms/rstp.git/commitdiff
Simple usermode helper script
authorStephen Hemminger <shemminger@linux-foundation.org>
Thu, 22 Mar 2007 23:05:52 +0000 (16:05 -0700)
committerStephen Hemminger <shemminger@linux-foundation.org>
Thu, 22 Mar 2007 23:05:52 +0000 (16:05 -0700)
bridge-stp [new file with mode: 0755]

diff --git a/bridge-stp b/bridge-stp
new file mode 100755 (executable)
index 0000000..c9ffcc6
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Script to start/stop spanning tree called from kernel
+
+RSTPCTL=/sbin/rstpctl
+
+if [ $# -ne 2 ]; then
+   echo "Usage: bridge-stp <bridge> {start|stop}"
+   exit 1
+fi
+BRIDGE=$1
+
+case $2 in
+     start) exec $RSTPCTL rstp $BRIDGE on ;;
+     stop) exec $RSTPCTL rstp $BRIDGE off ;;
+     *)
+       echo "Unknown action:" $2
+       echo "Usage: bridge-stp <bridge> {start|stop}"
+       exit 1
+esac
+
+
+
+       
+
+
+