]>
git.ipfire.org Git - people/ms/rstp.git/blob - bridge-stp
3 # Script to start/stop spanning tree called from kernel
4 # Make sure umask is sane
7 # Set up a default search path.
8 PATH
="/sbin:/usr/sbin:/bin:/usr/bin"
12 echo "Usage: bridge-stp <bridge> {start|stop}"
17 pid_file
=/var
/run
/${servicename}.pid
19 # Set $pid to pids from /var/run* for {program}. $pid should be declared
20 # local in the caller.
21 # Returns LSB exit code for the 'status' action.
26 read line
< "$pid_file"
28 [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid
="$pid $p"
30 if [ -n "$pid" ]; then
33 return 1 # "Program is dead and /var/run pid file exists"
35 return 3 # "Program is not running"
42 [ -n "$pid" ] && return
46 [ $RETVAL -eq 0 ] && touch /var
/lock
/subsys
/$service
56 exec /sbin
/rstpctl
$bridge on
;;
58 exec /sbin
/rstpctl
$bridge off
;;
60 echo "Unknown action:" $2
61 echo "Usage: bridge-stp <bridge> {start|stop}"