forked from freifunk-franken/firmware
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:
parent
9fb0b6b045
commit
6865009d56
|
@ -54,10 +54,10 @@ if [ $VERSION -eq $FIRMWARE_VERSION ]; then
|
||||||
echo -ne "Do you want to reinstall the current version? [y/N]\n"
|
echo -ne "Do you want to reinstall the current version? [y/N]\n"
|
||||||
read DO_UPDATE
|
read DO_UPDATE
|
||||||
case $DO_UPDATE in
|
case $DO_UPDATE in
|
||||||
[yY])
|
[yY]*|[Jj]*)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
[nN] | "")
|
[nN]*|"")
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -92,8 +92,8 @@ else
|
||||||
while true; do
|
while true; do
|
||||||
read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn
|
read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy] ) echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n"; sysupgrade ${FILE}; break;;
|
[Yy]*|[Jj]*) 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;;
|
*) echo -ne "\nAborting firmware upgrade.\n\n"; rm -f ${FILE}*; exit 0;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue