summaryrefslogtreecommitdiffstats
path: root/bridge-stp
diff options
context:
space:
mode:
Diffstat (limited to 'bridge-stp')
-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
+
+
+
+
+
+
+