From 921ba7d2edc6c428226b6b06f8cd9344c1c8cf26 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 3 Nov 2022 20:58:31 -0700 Subject: [PATCH] Headless bypass for sudo -v in easyinstall (#963) * Headless bypass for sudo check. Also, correct check for mac drivers dir. * Remove inline sudo -v checks. There's no proof they improve anything. * Use akuker's dropbox storage --- easyinstall.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easyinstall.sh b/easyinstall.sh index 4dba5c65..2d302b2a 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -78,6 +78,10 @@ function initialChecks() { # checks that the current user has sudoers privileges function sudoCheck() { + if [[ $HEADLESS ]]; then + echo "Skipping password check in headless mode" + return 0 + fi echo "Input your password to allow this script to make the above changes." sudo -v } @@ -128,8 +132,6 @@ function installPackagesStandalone() { # cache the pip packages function cachePipPackages(){ pushd $WEB_INSTALL_PATH - # Refresh the sudo authentication, which shouldn't trigger another password prompt - sudo -v sudo pip3 install -r ./requirements.txt popd } @@ -141,8 +143,6 @@ function compileRaScsi() { echo "Compiling with ${CORES:-1} simultaneous cores..." make clean