|
|
@@ -224,7 +224,7 @@ function checkCloudInitDevice() {
|
|
|
* @return string $if[1] device name or false if no device could be found
|
|
|
*/
|
|
|
function searchIfDevice( $mac) {
|
|
|
- exec("ifconfig -a | awk '/^[a-z]/ { gsub(/\:/,\"\", $1); iface=$1; next } /hwaddr/ { mac=$2; print mac, iface}'", $ifMacList, $sys_err_no);
|
|
|
+ exec("ifconfig -a | awk '/^[a-z]/ { gsub(/\:/,\"\", $1); iface=$1; next } /ether/ { mac=$2; print mac, iface}'", $ifMacList, $sys_err_no);
|
|
|
foreach($ifMacList as $ifMac) {
|
|
|
$if = explode(" ",$ifMac);
|
|
|
if (strcasecmp("$if[0]", "$mac") == 0) { // case insensitive
|