]> git.ipfire.org Git - people/ms/rstp.git/blame - bridge-stp
Simple usermode helper script
[people/ms/rstp.git] / bridge-stp
CommitLineData
3afabefa
SH
1#!/bin/bash
2#
3# Script to start/stop spanning tree called from kernel
4
5RSTPCTL=/sbin/rstpctl
6
7if [ $# -ne 2 ]; then
8 echo "Usage: bridge-stp <bridge> {start|stop}"
9 exit 1
10fi
11BRIDGE=$1
12
13case $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
20esac
21
22
23
24
25
26
27