Update to audible prompt without breaking configure for those that do not have the audibleprompt.sh code.
This commit is contained in:
parent
1d07b22397
commit
512204875c
@ -23,8 +23,10 @@
|
|||||||
|
|
||||||
|
|
||||||
# For audible sudo prompts:
|
# For audible sudo prompts:
|
||||||
|
unset sudoFlags
|
||||||
if [[ -x /etc/audibleprompt.sh ]]; then
|
if [[ -x /etc/audibleprompt.sh ]]; then
|
||||||
export SUDO_ASKPASS=/etc/audibleprompt.sh
|
export SUDO_ASKPASS=/etc/audibleprompt.sh
|
||||||
|
export sudoFlags=("-A")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Include functions common to all operations
|
# Include functions common to all operations
|
||||||
@ -49,7 +51,7 @@ diskSize="$(df -h --output='size' / | tail -1 | tr -cd '[:digit:].')"
|
|||||||
diskSize=${diskSize%.*}
|
diskSize=${diskSize%.*}
|
||||||
if [[ $diskSize -le 5 ]]; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -63,8 +65,8 @@ while [[ "$choice" != "Exit" ]]; do
|
|||||||
/usr/bin/nmtui-connect
|
/usr/bin/nmtui-connect
|
||||||
;;
|
;;
|
||||||
"Enable Bluetooth")
|
"Enable Bluetooth")
|
||||||
sudo sed -i 's/^#AutoEnable=false$/AutoEnable=true/' /etc/bluetooth/main.conf
|
sudo "${sudoFlags[@]}" sed -i 's/^#AutoEnable=false$/AutoEnable=true/' /etc/bluetooth/main.conf
|
||||||
sudo systemctl enable bluetooth --now
|
sudo "${sudoFlags[@]}" systemctl enable bluetooth --now
|
||||||
;;
|
;;
|
||||||
"Install Lxqt Desktop")
|
"Install Lxqt Desktop")
|
||||||
source .includes/gui.sh lxqt
|
source .includes/gui.sh lxqt
|
||||||
@ -88,7 +90,7 @@ while [[ "$choice" != "Exit" ]]; do
|
|||||||
source .includes/irc.sh
|
source .includes/irc.sh
|
||||||
;;
|
;;
|
||||||
"Update configure-stormux")
|
"Update configure-stormux")
|
||||||
sudo git pull
|
sudo "${sudoFlags[@]}" git pull
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user