]> git.ipfire.org Git - people/stevee/network.git/commitdiff
network status: Show if zones are enabled to start at boot
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Sep 2014 18:59:49 +0000 (20:59 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Sep 2014 18:59:49 +0000 (20:59 +0200)
src/functions/functions.cli

index 3389b4106898d22c15a399978061e963b746d23d..ca60d143c351a21c6d1159a58db523b8b6451781 100644 (file)
@@ -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}"