]> git.ipfire.org Git - people/stevee/network.git/commitdiff
ipv6-static: Make status output more beatiful.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2012 19:28:55 +0000 (19:28 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2012 19:28:55 +0000 (19:28 +0000)
hooks/zones/bridge.configs/ipv6-static

index 62e594843fc5fb2a29fab957267346d23c3f1165..57dfdefbe8bff54e5d313419c1e1c5fd432cd4e4 100755 (executable)
@@ -121,16 +121,20 @@ function _status() {
        
        config_read $(zone_dir ${zone})/configs/${config}
 
-       printf "        %10s - " "${HOOK}"
+       # Make sure ADDRESS is as short as possible.
+       ADDRESS=$(ipv6_implode ${ADDRESS})
+
+       local status
        if zone_has_ip ${zone} ${ADDRESS}/${PREFIX}; then
-               echo -ne "${COLOUR_UP} UP ${COLOUR_NORMAL}"
+               status=${MSG_HOOK_UP}
        else
-               echo -ne "${COLOUR_DOWN}DOWN${COLOUR_NORMAL}"
+               status=${MSG_HOOK_DOWN}
        fi
-       echo " - $(ipv6_implode ${ADDRESS})/${PREFIX}"
+       cli_statusline 3 "${HOOK}" "${status}"
 
+       cli_print_fmt1 3 "IPv6 address" "${ADDRESS}/${PREFIX}"
        if [ -n "${GATEWAY}" ]; then
-               echo "          Gateway: ${GATEWAY}"
+               cli_print_fmt1 3 "Gateway" "${GATEWAY}"
        fi
        cli_space