blob: 59c5786b74af89cb71820f4930a4b2e620d29f3a [file] [log] [blame]
William A. Kennington III85b11fb2021-03-06 00:47:39 -08001#!/bin/sh
2if [ "$#" -lt 2 ]; then
3 echo "Missing args: bridge-stp <bridge> <start|stop>" >&2
4 exit 1
5fi
6case "$2" in
7 start)
8 /usr/sbin/mstpctl addbridge "$1"
9 exit
10 ;;
11 stop)
12 /usr/sbin/mstpctl delbridge "$1"
13 exit
14 ;;
15 *)
16 echo "Invalid operation: $2" >&2
17 exit 1
18esac