]> git.ipfire.org Git - people/stevee/network.git/blobdiff - header-port
firewall: Re-unity firewall6/4 configuration again.
[people/stevee/network.git] / header-port
index bb169174c6efcf829436bea74877999b78c32def..b07c99c5b4da1830906fa0cddc4417951a47c635 100644 (file)
 #                                                                             #
 ###############################################################################
 
-. /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
@@ -88,3 +60,11 @@ function _info() {
 
        exit ${ERROR_OK}
 }
+
+function _status() {
+       local port=${1}
+       assert isset port
+
+       cli_device_headline ${port} --long
+       exit ${EXIT_OK}
+}