]> git.ipfire.org Git - people/ms/rstp.git/blob - bridge-stp
Simple usermode helper script
[people/ms/rstp.git] / bridge-stp
1 #!/bin/bash
2 #
3 # Script to start/stop spanning tree called from kernel
4
5 RSTPCTL=/sbin/rstpctl
6
7 if [ $# -ne 2 ]; then
8 echo "Usage: bridge-stp <bridge> {start|stop}"
9 exit 1
10 fi
11 BRIDGE=$1
12
13 case $2 in
14 start) exec $RSTPCTL rstp $BRIDGE on ;;
15 stop) exec $RSTPCTL rstp $BRIDGE off ;;
16 *)
17 echo "Unknown action:" $2
18 echo "Usage: bridge-stp <bridge> {start|stop}"
19 exit 1
20 esac
21
22
23
24
25
26
27