andre 4 лет назад
Родитель
Сommit
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
  * @return string $if[1] device name or false if no device could be found
  */
  */
 function searchIfDevice( $mac) {
 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) {
 	foreach($ifMacList as $ifMac) {
 		$if = explode(" ",$ifMac);
 		$if = explode(" ",$ifMac);
 		if (strcasecmp("$if[0]", "$mac") == 0) {                               // case insensitive
 		if (strcasecmp("$if[0]", "$mac") == 0) {                               // case insensitive