summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-08 21:01:41 +0200
committerErich Eckner <git@eckner.net>2019-07-08 21:01:41 +0200
commit7c07416b6afdcceaf845d0043e15cb514e7bc705 (patch)
tree3b80f1131f760d03f9b57bc66ffb03bffa74f6bb
parentfa6b67d74ad07d89c67d537479b9d60c60bb6ec4 (diff)
downloadupdate-all-7c07416b6afdcceaf845d0043e15cb514e7bc705.tar.xz
update-me.in: do not fail if hasSudo=true, but sudo is unavailable
-rw-r--r--update-me.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/update-me.in b/update-me.in
index 5c7c5ea..401a6bf 100644
--- a/update-me.in
+++ b/update-me.in
@@ -10,7 +10,8 @@ fi
. #ETCDIR#/update-me.conf
-if "${hasSudo}"; then
+if "${hasSudo}" && \
+ comand -v sudo >/dev/null; then
for ((i=0; i<${#postCmds[@]}; i++)); do
if [ "${postCmds[${i}]}" = 'check-kernel -r' ]; then
postCmds[${i}]='sudo check-kernel -r';