mirror of
https://github.com/morrownr/8821cu-20210916.git
synced 2024-12-21 13:55:40 +00:00
Use printf and case around the read statements to make the prompts a bit friendlier
This commit is contained in:
parent
c0281e1d05
commit
53e8b12bcb
@ -52,11 +52,11 @@ echo ": ${SCRIPT_NAME} v${SCRIPT_VERSION}"
|
||||
|
||||
${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE}
|
||||
|
||||
echo "Do you want to apply the new options by rebooting now? [y/N] "
|
||||
printf "Do you want to apply the new options by rebooting now? [y/N] "
|
||||
read -r REPLY
|
||||
echo # move to a new line
|
||||
if [ "${REPLY}" = y ] || [ "${REPLY}" = Y ]; then
|
||||
reboot
|
||||
fi
|
||||
case "$REPLY" in
|
||||
[yY]*) reboot ;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
@ -342,19 +342,19 @@ fi
|
||||
|
||||
# if NoPrompt is not used, ask user some questions
|
||||
if [ $NO_PROMPT -ne 1 ]; then
|
||||
echo "Do you want to edit the driver options file now? [y/N]"
|
||||
printf "Do you want to edit the driver options file now? [y/N] "
|
||||
read -r REPLY
|
||||
echo
|
||||
if [ "$REPLY" = y ] || [ "$REPLY" = Y ]; then
|
||||
${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE}
|
||||
fi
|
||||
case "$REPLY" in
|
||||
[yY]*) ${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE} ;;
|
||||
esac
|
||||
|
||||
echo "Do you want to reboot now? (recommended) [y/N]"
|
||||
printf "Do you want to reboot now? (recommended) [y/N] "
|
||||
read -r REPLY
|
||||
echo
|
||||
if [ "$REPLY" = y ] || [ "$REPLY" = Y ]; then
|
||||
reboot
|
||||
fi
|
||||
case "$REPLY" in
|
||||
[yY]*) reboot ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -129,12 +129,12 @@ echo "You may now delete the driver directory if desired."
|
||||
|
||||
# if NoPrompt is not used, ask user some questions
|
||||
if [ $NO_PROMPT -ne 1 ]; then
|
||||
echo "Do you want to reboot now? (recommended) [y/N]"
|
||||
printf "Do you want to reboot now? (recommended) [y/N] "
|
||||
read -r REPLY
|
||||
echo
|
||||
if [ "$REPLY" = y ] || [ "$REPLY" = Y ]; then
|
||||
reboot
|
||||
fi
|
||||
case "$REPLY" in
|
||||
[yY]*) reboot ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user