Update to audible prompt without breaking configure for those that do not have the audibleprompt.sh code.

This commit is contained in:
Storm Dragon 2023-08-19 16:57:34 -04:00
parent 1d07b22397
commit 512204875c

View File

@ -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