From 815411968bc10bed2fce9e325eb6d029de0deab4 Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Fri, 20 Nov 2015 00:34:29 +0800 Subject: [PATCH] Silence the ifconfig not found message --- src/pocketmine/utils/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/utils/Utils.php b/src/pocketmine/utils/Utils.php index 8caa74358..c6f13ff9d 100644 --- a/src/pocketmine/utils/Utils.php +++ b/src/pocketmine/utils/Utils.php @@ -103,7 +103,7 @@ class Utils{ if(file_exists("/etc/machine-id")){ $machine .= file_get_contents("/etc/machine-id"); }else{ - @exec("ifconfig", $mac); + @exec("ifconfig 2>/dev/null", $mac); $mac = implode("\n", $mac); if(preg_match_all("#HWaddr[ \t]{1,}([0-9a-f:]{17})#", $mac, $matches)){ foreach($matches[1] as $i => $v){