From 8001de782b7098590b1c6e62a8c6e275819b4e4d Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Sun, 12 May 2019 17:05:34 +0800 Subject: [PATCH] Update --- netboot.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/netboot.sh b/netboot.sh index fe41776..7d4e213 100644 --- a/netboot.sh +++ b/netboot.sh @@ -19,7 +19,11 @@ set -e 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)"