diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-03-10 06:59:14 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-03-10 06:59:40 +0100 |
commit | a296c95dbd9896537f9607bd5856a03ef971f81e (patch) | |
tree | d4b548d0af9cbe44e59170824a4bf7f1a87208a4 | |
parent | f2a5b5e467caa99c78939eea236f0036031a499a (diff) | |
download | pfsense-a296c95dbd9896537f9607bd5856a03ef971f81e.zip pfsense-a296c95dbd9896537f9607bd5856a03ef971f81e.tar.gz |
Show dmesg interface names when first configuring the network
-rw-r--r-- | etc/inc/config.inc | 4 | ||||
-rw-r--r-- | etc/inc/util.inc | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 5ec1e96..24b5115 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -2432,8 +2432,8 @@ EOD; echo "No interfaces found!\n"; } else { foreach ($iflist as $iface => $ifa) { - echo sprintf("% -8s%s%s\n", $iface, $ifa['mac'], - $ifa['up'] ? " (up)" : ""); + echo sprintf("% -8s%s%s\t%s\n", $iface, $ifa['mac'], + $ifa['up'] ? " (up)" : " (down)", $ifa['dmesg']); } } diff --git a/etc/inc/util.inc b/etc/inc/util.inc index dd6c517..c7f0293 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -416,6 +416,10 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "") if($friendly != "") { $toput['friendly'] = $friendly; } + $dmesg_arr = array(); + exec("/sbin/dmesg |grep $ifname | head -n1", $dmesg_arr); + preg_match_all("/<(.*?)>/i", $dmesg_arr[0], $dmesg); + $toput['dmesg'] = $dmesg[1][0]; $iflist[$ifname] = $toput; break; case "friendly": |