Bohan Yang 7 年之前
父节点
当前提交
01bf439c94
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      netboot.sh

+ 4 - 4
netboot.sh

@@ -18,10 +18,6 @@
 
 set -e
 
-command_exists() {
-	command -v "$@" > /dev/null 2>&1
-}
-
 user="$(id -un 2>/dev/null || true)"
 
 sudo=''
@@ -33,6 +29,10 @@ if [ "$user" != 'root' ]; then
   fi
 fi
 
+command_exists() {
+	$sudo command -v "$@" > /dev/null 2>&1
+}
+
 while [ $# -gt 0 ]; do
   case $1 in
     --template)