diff --git a/configure-stormux.sh b/configure-stormux.sh index a498363..869a1d8 100755 --- a/configure-stormux.sh +++ b/configure-stormux.sh @@ -23,8 +23,10 @@ # For audible sudo prompts: +unset sudoFlags if [[ -x /etc/audibleprompt.sh ]]; then export SUDO_ASKPASS=/etc/audibleprompt.sh + export sudoFlags=("-A") fi # Include functions common to all operations @@ -49,7 +51,7 @@ diskSize="$(df -h --output='size' / | tail -1 | tr -cd '[:digit:].')" diskSize=${diskSize%.*} if [[ $diskSize -le 5 ]]; then if [[ "$(yesno "$diskSource is only $diskSize gigs, which means it probably needs to be resized. Would you like to do this now?")" == "Yes" ]]; then - sudo growpartfs $diskSource + sudo "${sudoFlags[@]} growpartfs $diskSource fi fi @@ -63,8 +65,8 @@ while [[ "$choice" != "Exit" ]]; do /usr/bin/nmtui-connect ;; "Enable Bluetooth") - sudo sed -i 's/^#AutoEnable=false$/AutoEnable=true/' /etc/bluetooth/main.conf - sudo systemctl enable bluetooth --now + sudo "${sudoFlags[@]}" sed -i 's/^#AutoEnable=false$/AutoEnable=true/' /etc/bluetooth/main.conf + sudo "${sudoFlags[@]}" systemctl enable bluetooth --now ;; "Install Lxqt Desktop") source .includes/gui.sh lxqt @@ -88,7 +90,7 @@ while [[ "$choice" != "Exit" ]]; do source .includes/irc.sh ;; "Update configure-stormux") - sudo git pull + sudo "${sudoFlags[@]}" git pull exit $? ;; esac