Bohan Yang 7 年 前
コミット
8001de782b
1 ファイル変更5 行追加1 行削除
  1. 5 1
      netboot.sh

+ 5 - 1
netboot.sh

@@ -19,7 +19,11 @@
 set -e
 set -e
 
 
 command_exists() {
 command_exists() {
-	$sudo command -v "$@" > /dev/null 2>&1
+  _PATH="$PATH"
+  PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
+  command -v "$@" > /dev/null 2>&1
+  PATH="$_PATH"
+  unset _PATH
 }
 }
 
 
 user="$(id -un 2>/dev/null || true)"
 user="$(id -un 2>/dev/null || true)"