From: Michael Tremer Date: Thu, 10 Aug 2017 21:44:58 +0000 (+0200) Subject: ports: Drop unused and complicated info function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0fde18f044f2be935e3dea3ad6cf3723c5df647;p=people%2Fstevee%2Fnetwork.git ports: Drop unused and complicated info function Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.hook b/src/functions/functions.hook index e910c68e..b8049db5 100644 --- a/src/functions/functions.hook +++ b/src/functions/functions.hook @@ -232,7 +232,7 @@ hook_valid_command_port() { ;; # Status - status|info|children) + status|children) return ${EXIT_TRUE} ;; esac diff --git a/src/functions/functions.ports b/src/functions/functions.ports index af50ee2a..f9b31f3f 100644 --- a/src/functions/functions.ports +++ b/src/functions/functions.ports @@ -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} diff --git a/src/header-port b/src/header-port index ca1b0917..238749e6 100644 --- a/src/header-port +++ b/src/header-port @@ -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