From: Michael Tremer Date: Thu, 17 Jun 2010 22:36:18 +0000 (+0200) Subject: network: pppoe: Add some nice status output. X-Git-Tag: 001~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eadf1dad754f95e356870931bc25e533651159a;p=network.git network: pppoe: Add some nice status output. --- diff --git a/hooks/pppoe b/hooks/pppoe index 3d4af332..a3a16880 100755 --- a/hooks/pppoe +++ b/hooks/pppoe @@ -238,4 +238,27 @@ function _discover() { exit ${DISCOVER_OK} } +function _status() { + local zone=${1} + + cli_status_headline ${zone} + + # Exit if zone is down + if ! zone_is_up ${zone}; then + echo # Empty line + exit ${EXIT_ERROR} + fi + + cli_headline " Point-to-Point-over-Ethernet protocol:" + echo " IP-Address : $(red_db_get ${zone} local-ip-address)" + echo " Gateway : $(red_db_get ${zone} remote-ip-address)" + echo " DNS-Server : $(red_db_get ${zone} dns)" + echo + echo " MAC-Remote : $(red_db_get ${zone} remote-address)" + echo + echo " MTU : $(device_get_mtu ${zone})" + echo # Empty line + exit ${EXIT_OK} +} + run $@