#!/bin/bash # # Script to start/stop spanning tree called from kernel RSTPCTL=/sbin/rstpctl if [ $# -ne 2 ]; then echo "Usage: bridge-stp {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 {start|stop}" exit 1 esac