# Exit immediately, if zone configuration does not exist.
# This is for manually created bridges.
if ! zone_exists ${zone}; then
- exit 0
+ exit 1
fi
# Check if mstpd is running. If not, try to start it.
if ! service_is_active mstpd; then
log ERROR "mstpd is not running. STP might not work."
+ exit 1
fi
fi
case "${action}" in
start)
log DEBUG "Enabling STP for zone '${zone}'."
- mstpctl notify-daemon-that-stp-is-on ${zone}
- assert [ $? -eq 0 ]
+ exec mstpctl notify-daemon-that-stp-is-on ${zone}
;;
stop)
log DEBUG "Disabling STP for zone '${zone}'."
- mstpctl notify-daemon-that-stp-is-off ${zone}
+ exec mstpctl notify-daemon-that-stp-is-off ${zone}
;;
*)
log ERROR "Unknown action given: ${action}."
+ exit 1
;;
esac
-
-exit 0