William A. Kennington III | 85b11fb | 2021-03-06 00:47:39 -0800 | [diff] [blame] | 1 | #!/bin/sh |
2 | if [ "$#" -lt 2 ]; then | ||||
3 | echo "Missing args: bridge-stp <bridge> <start|stop>" >&2 | ||||
4 | exit 1 | ||||
5 | fi | ||||
6 | case "$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 | ||||
18 | esac |