From 01bf439c94b2c800036e0d3f077bcabd6da6ebfb Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Sun, 12 May 2019 16:48:24 +0800 Subject: [PATCH] Update --- netboot.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netboot.sh b/netboot.sh index 650314e..bc4e285 100644 --- a/netboot.sh +++ b/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)