summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-03-22 16:05:52 -0700
committerStephen Hemminger <shemminger@linux-foundation.org>2007-03-22 16:05:52 -0700
commit3afabefa1e63ec98ecad3815e6602de5c58c701e (patch)
treee2f300e7921cdc10aea4f4c83fc0065b72b0c012
parentfcea43ad6fb5b65897be852e55052a93eb9c7396 (diff)
downloadrstp-3afabefa1e63ec98ecad3815e6602de5c58c701e.tar.gz
Simple usermode helper script
-rwxr-xr-xbridge-stp27
1 files changed, 27 insertions, 0 deletions
diff --git a/bridge-stp b/bridge-stp
new file mode 100755
index 0000000..c9ffcc6
--- /dev/null
+++ b/bridge-stp
@@ -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
+
+
+
+
+
+
+