fff-sysupgrade: Security question with yes/no

Fixes: #31

Changes from Bjoerns ticket. Thanks.

CC: freifunk@bjoernengel.de
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
This commit is contained in:
Tim Niemeyer 2017-07-02 10:41:40 +02:00 committed by Tobias Klaus
parent 9fb0b6b045
commit 6865009d56
1 changed files with 4 additions and 4 deletions

View File

@ -54,10 +54,10 @@ if [ $VERSION -eq $FIRMWARE_VERSION ]; then
echo -ne "Do you want to reinstall the current version? [y/N]\n"
read DO_UPDATE
case $DO_UPDATE in
[yY])
[yY]*|[Jj]*)
break
;;
[nN] | "")
[nN]*|"")
exit 1
;;
*)
@ -92,8 +92,8 @@ else
while true; do
read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn
case $yn in
[Yy] ) echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n"; sysupgrade ${FILE}; break;;
[Nn]|* ) echo -ne "\nAborting firmware upgrade.\n\n"; rm -f ${FILE}*; exit 0;;
[Yy]*|[Jj]*) echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n"; sysupgrade ${FILE}; break;;
*) echo -ne "\nAborting firmware upgrade.\n\n"; rm -f ${FILE}*; exit 0;;
esac
done
fi