STP_MAXAGE=20
STP_PRIORITY=512
-function hook_check_settings() {
+hook_check_settings() {
assert ismac MAC
assert isbool STP
assert isoneof STP_MODE stp rstp
assert isinteger MTU
}
-function hook_parse_cmdline() {
+hook_parse_cmdline() {
while [ $# -gt 0 ]; do
case "${1}" in
--stp=*)
done
}
-function hook_up() {
+hook_up() {
local zone=${1}
assert isset zone
exit ${EXIT_OK}
}
-function hook_hotplug() {
+hook_hotplug() {
local zone="${1}"
assert isset zone
exit ${EXIT_OK}
}
-function hook_down() {
+hook_down() {
local zone="${1}"
assert isset zone
exit ${EXIT_OK}
}
-function hook_status() {
+hook_status() {
local zone="${1}"
assert isset zone
exit ${EXIT_OK}
}
-function hook_check_port_settings() {
+hook_check_port_settings() {
if isset COST; then
assert isinteger COST
fi
fi
}
-function hook_port_attach() {
+hook_port_attach() {
# Excepting at least two arguments here
assert [ $# -ge 2 ]
exit ${EXIT_OK}
}
-function hook_port_detach() {
+hook_port_detach() {
assert [ $# -eq 2 ]
local zone="${1}"
exit ${EXIT_OK}
}
-function hook_port_edit() {
+hook_port_edit() {
hook_port_attach $@
}
-function hook_port_up() {
+hook_port_up() {
assert [ $# -eq 2 ]
local zone="${1}"
exit ${EXIT_OK}
}
-function hook_port_down() {
+hook_port_down() {
assert [ $# -eq 2 ]
local zone="${1}"
exit ${EXIT_OK}
}
-function hook_port_status() {
+hook_port_status() {
assert [ $# -eq 2 ]
local zone="${1}"