]>
git.ipfire.org Git - people/ms/mstpd.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
/${service}.pid
19 # Set this to the list of bridges for which MSTP should be used
22 # Set $pid to pids from /var/run* for {program}. $pid should be declared
23 # local in the caller.
24 # Returns LSB exit code for the 'status' action.
30 read line
< "$pid_file"
32 [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid
="$pid $p"
34 if [ -n "$pid" ]; then
37 return 1 # "Program is dead and /var/run pid file exists"
39 return 3 # "Program is not running"
44 checkpid
$pid_file ||
exit 1
45 for b
in $MSTP_BRIDGES; do
46 if [ "$bridge" == "$b" ]; then
54 echo "Unknown action:" $2
55 echo "Usage: bridge-stp <bridge> {start|stop}"