Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
;;
# Status
- status|info)
+ status|info|children)
return ${EXIT_TRUE}
;;
esac
port_get_children() {
local port=${1}
- port_get_info ${port} PORT_CHILDREN
+ assert port_exists "${port}"
+
+ port_cmd "children" "${port}"
}
port_zone() {
hook_default_edit $@
}
+# Returns a list of all children of this port
+hook_children() {
+ local port="${1}"
+
+ if ! port_settings_read "${port}" ${HOOK_SETTINGS}; then
+ log ERROR "Could not read port settings: ${port}"
+ return ${EXIT_OK}
+ fi
+
+ print "${SLAVES}"
+}
+
hook_info() {
local port="${1}"
assert isset port