From aef810a0d86570093de39e68e3136ad3c496c4af Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 25 Jan 2023 12:37:30 +0000 Subject: [PATCH] Update 2 files - /home/dot_local/bin/executable_provision.tmpl - /local/provision.sh --- home/dot_local/bin/executable_provision.tmpl | 11 ++++------- local/provision.sh | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/home/dot_local/bin/executable_provision.tmpl b/home/dot_local/bin/executable_provision.tmpl index 9567a3b7..6132351e 100644 --- a/home/dot_local/bin/executable_provision.tmpl +++ b/home/dot_local/bin/executable_provision.tmpl @@ -11,13 +11,10 @@ {{ includeTemplate "universal/logg" }} ### Prompt for sudo password and (optionally) enable passwordless sudo -sudo -n true || SUDO_EXIT_CODE=$? -if [ -n "$SUDO_EXIT_CODE" ]; then - echo 'Your user will temporarily be granted passwordless sudo for the duration of the script' - echo 'Press `CTRL+C` to bypass this prompt to either enter your password when needed or perform a non-privileged installation' - echo 'Note: Non-privileged installations are not yet supported' - echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers -fi +logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script' +logg info 'Press `CTRL+C` to bypass this prompt to either enter your password when needed or perform a non-privileged installation' +logg info 'Note: Non-privileged installations are not yet supported' +echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers ### Ensure ~/.local/share/megabyte-labs is a directory if [ ! -d "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs" ]; then diff --git a/local/provision.sh b/local/provision.sh index a3feb36a..ffab0db8 100644 --- a/local/provision.sh +++ b/local/provision.sh @@ -181,13 +181,10 @@ logg() { } ### Prompt for sudo password and (optionally) enable passwordless sudo -sudo -n true || SUDO_EXIT_CODE=$? -if [ -n "$SUDO_EXIT_CODE" ]; then - echo 'Your user will temporarily be granted passwordless sudo for the duration of the script' - echo 'Press `CTRL+C` to bypass this prompt. You will either enter your password when needed or perform a non-privileged installation' - echo 'Note: Non-privileged installations are not yet supported - pull requests welcome' - echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers -fi +logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script' +logg info 'Press `CTRL+C` to bypass this prompt to either enter your password when needed or perform a non-privileged installation' +logg info 'Note: Non-privileged installations are not yet supported' +echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers ### Qubes dom0 if command -v qubesctl > /dev/null; then