Make sure audible sudo prompts are available throughout configure-stormux and the start up process.
This commit is contained in:
parent
1e24598316
commit
40fd173777
@ -1,15 +1,25 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "$(tty)" != "/dev/tty1" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
|
if [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
|
||||||
exit 0
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
|
if ! [[ -x /usr/local/bin/configure-stormux ]]; then
|
||||||
exit 0
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(tty)" = "/dev/tty1" ]]; then
|
# For audible sudo prompts:
|
||||||
cat << "EOF"
|
unset sudoFlags
|
||||||
|
if [[ -x /etc/audibleprompt.sh ]]; then
|
||||||
|
export SUDO_ASKPASS=/etc/audibleprompt.sh
|
||||||
|
export sudoFlags=("-A")
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << "EOF"
|
||||||
Hello, and welcome to Stormux!
|
Hello, and welcome to Stormux!
|
||||||
|
|
||||||
Let's get you set up. After you press enter, you will be prompted for the sudo password.
|
Let's get you set up. After you press enter, you will be prompted for the sudo password.
|
||||||
@ -20,6 +30,5 @@ Once again, the password is stormux in all lower case letters.
|
|||||||
|
|
||||||
Please press enter to continue.
|
Please press enter to continue.
|
||||||
EOF
|
EOF
|
||||||
read -r
|
read -r
|
||||||
sudo configure-stormux
|
sudo "${sudoFlags[@]}" configure-stormux
|
||||||
fi
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export SUDO_ASKPASS=/etc/audibleprompt.sh
|
# For audible sudo prompts:
|
||||||
|
unset sudoFlags
|
||||||
|
if [[ -x /etc/audibleprompt.sh ]]; then
|
||||||
|
export SUDO_ASKPASS=/etc/audibleprompt.sh
|
||||||
|
export sudoFlags=("-A")
|
||||||
|
fi
|
||||||
|
|
||||||
trap 'popd &> /dev/null' EXIT
|
trap 'popd &> /dev/null' EXIT
|
||||||
|
|
||||||
if [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
|
if [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
|
||||||
@ -11,7 +17,8 @@ fi
|
|||||||
|
|
||||||
if [[ ! -d /opt/configure-stormux ]]; then
|
if [[ ! -d /opt/configure-stormux ]]; then
|
||||||
# Offer to switch fenrir layout.
|
# Offer to switch fenrir layout.
|
||||||
echo "Would you like to switch Fenrir to laptop layout? (y/n)"
|
echo "Would you like to switch Fenrir to laptop layout?"
|
||||||
|
echo "Press y for yes or n for no followed by enter."
|
||||||
read -r continue
|
read -r continue
|
||||||
continue="${continue::1}"
|
continue="${continue::1}"
|
||||||
if [[ "${continue,}" == "y" ]];then
|
if [[ "${continue,}" == "y" ]];then
|
||||||
|
Loading…
Reference in New Issue
Block a user