]> git.ipfire.org Git - people/arne_f/network.git/commitdiff
network: Change status output of ipv4-static hook.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Jun 2010 13:14:46 +0000 (15:14 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Jun 2010 13:14:46 +0000 (15:14 +0200)
This will make the output more readable when there are
IP addresses with different length.

hooks/bridge.configs/ipv4-static

index 6ff7f7d876be3c27e344725376cb654ce8ec4cb3..d897660b2cdcdfa5b9ed208537be8f9fd6efc1dd 100755 (executable)
@@ -120,13 +120,13 @@ function _status() {
        
        config_read $(zone_dir ${zone})/${config}
 
-       echo -n "        ${HOOK} - ${ADDRESS}/${PREFIX} - "
+       printf "        %10s - " "${HOOK}"
        if zone_has_ipv4 ${zone} ${ADDRESS}/${PREFIX}; then
-               echo -ne "${COLOUR_OK}OK   ${COLOUR_NORMAL}"
+               echo -ne "${COLOUR_OK} OK  ${COLOUR_NORMAL}"
        else
                echo -ne "${COLOUR_ERROR}ERROR${COLOUR_NORMAL}"
        fi
-       echo # End line
+       echo " - ${ADDRESS}/${PREFIX}"
 
        if [ -n "${GATEWAY}" ]; then
                echo "          Gateway: ${GATEWAY}"