# #
###############################################################################
-. /usr/lib/network/functions
-
-HOOK=$(basename ${0})
INFO_SETTINGS="HOOK PORT_PARENTS PORT_CHILDREN"
-while [ $# -gt 0 ]; do
- case "${1}" in
- -*)
- error "Unrecognized option: ${1}"
- exit ${EXIT_ERROR}
- ;;
- *)
- action=${1}
- ;;
- esac
- shift
- [ -n "${action}" ] && break
-done
-
-function run() {
- case "${action}" in
- edit|add|create|rem|up|down|status|info|hotplug|hotplug_rename)
- _${action} $@
- ;;
- esac
-
- error "Port hook '${HOOK}' didn't exit properly."
- exit ${EXIT_ERROR}
-}
-
# This function is called after a device has been plugged
# into the system and got its correct name.
# The function is intended to create child ports and things
exit ${ERROR_OK}
}
+
+function _status() {
+ local port=${1}
+ assert isset port
+
+ cli_device_headline ${port} --long
+ exit ${EXIT_OK}
+}