]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added a spanning tree protocol script.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Dec 2008 22:48:40 +0000 (23:48 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Dec 2008 22:48:40 +0000 (23:48 +0100)
src/initscripts/networking/services/stp [new file with mode: 0644]
src/rootfiles/core/02.initscripts

diff --git a/src/initscripts/networking/services/stp b/src/initscripts/networking/services/stp
new file mode 100644 (file)
index 0000000..ee294fc
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+########################################################################
+# Begin $NETWORK_DEVICES/services/stp
+#
+# Description : Spanning Tree Protocol Script
+#
+# Authors     : Michael Tremer - michael.tremer@ipfire.org
+#
+# Version     : 00.00
+#
+# Notes       : This script adds stp support to a bridge.
+#
+########################################################################
+
+. /lib/lsb/init-functions
+. ${IFCONFIG}
+
+case "${2}" in
+       up)
+               MESSAGE="Enabling Spanning Tree Protocol on interface ${1}..."
+               brctl stp ${1} on
+               evaluate_retval
+       ;;
+
+       down)
+               MESSAGE="Disabling Spanning Tree Protocol on interface ${1}..."
+               brctl stp ${1} off
+               evaluate_retval
+       ;;
+
+       *)
+               echo "Usage: ${0} [interface] {up|down}"
+               exit 1
+       ;;
+esac
+
+# End $NETWORK_DEVICES/services/stp
index c3df3c27871ccf24894d56bf05cc43886b64c761..ab58ea0bcb00722a9deaf916d68abdc388f6a631 100644 (file)
@@ -24,6 +24,7 @@ etc/init.d/networking/services
 etc/init.d/networking/services/bridge-slave
 etc/init.d/networking/services/ipv4-static
 etc/init.d/networking/services/ipv4-static-route
+etc/init.d/networking/services/stp
 etc/init.d/ntpd
 etc/init.d/openldap
 etc/init.d/random