]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/functions/functions.cli
ipv4-static: Update hook
[people/stevee/network.git] / src / functions / functions.cli
index 3389b4106898d22c15a399978061e963b746d23d..a3ee722b113ba38f18b7a959cdab225d34183dca 100644 (file)
@@ -26,11 +26,11 @@ function cli_help_requested() {
 
        if [ -n "${argument}" ]; then
                if listmatch ${argument} help -h --help; then
-                       return ${EXIT_OK}
+                       return ${EXIT_TRUE}
                fi
        fi
 
-       return ${EXIT_ERROR}
+       return ${EXIT_FALSE}
 }
 
 function cli_run_help() {
@@ -79,7 +79,19 @@ function cli_device_headline() {
 
        # Print the hook for all zones.
        if [ "${type}" = "zone" ]; then
-               headline_prefix="${headline_prefix} ($(zone_get_hook ${device}))"
+               local enabled
+               zone_is_enabled "${device}"
+               case "$?" in
+                       ${EXIT_TRUE})
+                               enabled="enabled"
+                               ;;
+                       ${EXIT_FALSE})
+                               enabled="disabled"
+                               ;;
+               esac
+
+               local hook="$(zone_get_hook "${device}")"
+               headline_prefix="${headline_prefix} (${enabled}, ${hook})"
        fi
        cli_headline 1 "${headline_prefix}"