]> git.ipfire.org Git - people/stevee/network.git/commitdiff
ports: Drop unused and complicated info function
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Aug 2017 21:44:58 +0000 (23:44 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Aug 2017 21:44:58 +0000 (23:44 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.hook
src/functions/functions.ports
src/header-port

index e910c68e1487995a84308160cd002c69ccaececf..b8049db5b7a62336e6bcb522407dcc790db71086 100644 (file)
@@ -232,7 +232,7 @@ hook_valid_command_port() {
                        ;;
 
                # Status
-               status|info|children)
+               status|children)
                        return ${EXIT_TRUE}
                        ;;
        esac
index af50ee2a3c2616c79196146c2af3dbba32e2a67c..f9b31f3f0b5616d5b23673c9b016d6ff54e7581a 100644 (file)
@@ -246,10 +246,6 @@ port_status() {
        port_cmd status $@
 }
 
-port_info() {
-       port_cmd info $@
-}
-
 port_cmd() {
        local cmd=${1}
        local port=${2}
@@ -299,20 +295,6 @@ port_find_free() {
        return ${EXIT_ERROR}
 }
 
-port_get_info() {
-       local port=${1}
-       local key=${2}
-
-       assert isset port
-       assert port_exists ${port}
-       assert isset key
-
-       (
-               eval $(port_info ${port})
-               echo "${!key}"
-       )
-}
-
 port_get_children() {
        local port=${1}
 
index ca1b0917356de8460cb5ce953baa5fb17c445f5c..238749e61442be68138be3e0d8ca7512737be363 100644 (file)
@@ -76,28 +76,6 @@ hook_children() {
        print "${SLAVES}"
 }
 
-hook_info() {
-       local port="${1}"
-       assert isset port
-       shift
-
-       settings_read "$(port_file ${port})"
-
-       local key val
-       for key in PORT_PARENTS PORT_CHILDREN; do
-               val="${key}_VAR"
-               val=${!val}
-
-               assign "${key}" "${!val}"
-       done
-
-       for key in ${INFO_SETTINGS}; do
-               echo "${key}=\"${!key}\""
-       done
-
-       exit ${ERROR_OK}
-}
-
 hook_status() {
        local port="${1}"
        assert isset port