]> git.ipfire.org Git - network.git/commitdiff
network: pppoe: Add some nice status output.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Jun 2010 22:36:18 +0000 (00:36 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Jun 2010 22:36:18 +0000 (00:36 +0200)
hooks/pppoe

index 3d4af332fca12065db410d13222fd392d78efcd6..a3a1688068d4ae2af9e6a5e5628039b244f19612 100755 (executable)
@@ -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 $@