Преглед на файлове

hwaddr now called ether

andre преди 4 години
родител
ревизия
b9a93f045d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      proxmox_cloud-init.php

+ 1 - 1
proxmox_cloud-init.php

@@ -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