[PATCH v10 2/3] Added Version check in sysupgrade
Tim Niemeyer
tim at tn-x.org
Mo Apr 4 18:05:56 CEST 2016
Hi
Am Donnerstag, den 24.03.2016, 21:56 +0100 schrieb Jan Kraus:
> Signed-off-by: Jan Kraus <mayosemmel at gmail.com>
Reviewed-by: Tim Niemeyer <tim at tn-x.org>
Tim
> ---
> bsp/default/root_file_system/etc/sysupgrade.sh | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/bsp/default/root_file_system/etc/sysupgrade.sh b/bsp/default/root_file_system/etc/sysupgrade.sh
> index a90164d..03778ef 100755
> --- a/bsp/default/root_file_system/etc/sysupgrade.sh
> +++ b/bsp/default/root_file_system/etc/sysupgrade.sh
> @@ -15,6 +15,26 @@ VERSION=$(grep -Po '(?<=^VERSION:).*' release.nfo)
> rm -f release.nfo
> echo -ne "Firmware found on server: $VERSION\n"
>
> +if [ $VERSION -eq $FIRMWARE_VERSION ]; then
> + echo -ne "The installed firmware version is already the current version.\n\n"
> +
> + while true; do
> + echo -ne "Do you want to reinstall the current version? [y/N]\n"
> + read DO_UPDATE
> + case $DO_UPDATE in
> + [yY])
> + break
> + ;;
> + [nN] | "")
> + exit 1
> + ;;
> + *)
> + echo "Invalid input"
> + ;;
> + esac
> + done
> +fi
> +
> FILE="fff-${FIRMWARE_COMMUNITY}_${VERSION}_${BOARD}-sysupgrade.bin"
> echo -ne "Downloading $FILE\n\n"
> wget $(uci get firmware.upgrade.path)/${FILE}
> --
> 2.1.4
>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : signature.asc
Dateityp : application/pgp-signature
Dateigröße : 473 bytes
Beschreibung: This is a digitally signed message part
URL : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20160404/8379440d/attachment-0001.sig>
Mehr Informationen über die Mailingliste franken-dev