Message ID | 1467218944-9874-1-git-send-email-mayosemmel@gmail.com |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/src/packages/fff/fff-sysupgrade/Makefile b/src/packages/fff/fff-sysupgrade/Makefile index ded9852..6c5dd43 100644 --- a/src/packages/fff/fff-sysupgrade/Makefile +++ b/src/packages/fff/fff-sysupgrade/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-sysupgrade -PKG_VERSION:=0.0.1 -PKG_RELEASE:=1 +PKG_VERSION:=0.0.2 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/fff-sysupgrade diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh index e6bc7d9..f8c6c08 100755 --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh @@ -34,6 +34,10 @@ 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" + if [ "$1" = "--script"]; then + exit 1 + fi + while true; do echo -ne "Do you want to reinstall the current version? [y/N]\n" read DO_UPDATE @@ -65,6 +69,10 @@ if [ $ret -ne 0 ]; then rm -f ${FILE}* exit 1 else + if [ "$1" = "--script"]; then + echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n" + sysupgrade ${FILE} + fi while true; do read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn case $yn in
Hi Reviewed-by: Christian Dresel <fff@chrisi01.de> mfg Christian On 29.06.2016 18:49, Jan Kraus wrote: > This makes automatic update via cron jobs possible. > > Signed-off-by: Jan Kraus <mayosemmel@gmail.com> > --- > Changes in v2: removed "break", which was accidential copied from switch..case. Also changed ";" to newline. > --- > src/packages/fff/fff-sysupgrade/Makefile | 4 ++-- > src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh | 8 ++++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/src/packages/fff/fff-sysupgrade/Makefile b/src/packages/fff/fff-sysupgrade/Makefile > index ded9852..6c5dd43 100644 > --- a/src/packages/fff/fff-sysupgrade/Makefile > +++ b/src/packages/fff/fff-sysupgrade/Makefile > @@ -1,8 +1,8 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=fff-sysupgrade > -PKG_VERSION:=0.0.1 > -PKG_RELEASE:=1 > +PKG_VERSION:=0.0.2 > +PKG_RELEASE:=2 > > PKG_BUILD_DIR:=$(BUILD_DIR)/fff-sysupgrade > > diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh > index e6bc7d9..f8c6c08 100755 > --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh > +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh > @@ -34,6 +34,10 @@ 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" > > + if [ "$1" = "--script"]; then > + exit 1 > + fi > + > while true; do > echo -ne "Do you want to reinstall the current version? [y/N]\n" > read DO_UPDATE > @@ -65,6 +69,10 @@ if [ $ret -ne 0 ]; then > rm -f ${FILE}* > exit 1 > else > + if [ "$1" = "--script"]; then > + echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n" > + sysupgrade ${FILE} > + fi > while true; do > read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn > case $yn in
On 06/29/2016 06:49 PM, Jan Kraus wrote: Hi Jan hast du das Skript getestet? Dieser Code (Zeile 37 und 72): if [ "$1" = "--script"] wird nicht laufen, vor der schliessenden, eckigen Klammer fehlt ein Leerzeichen. Gruss -Steffen > This makes automatic update via cron jobs possible. > > Signed-off-by: Jan Kraus <mayosemmel@gmail.com> > --- > Changes in v2: removed "break", which was accidential copied from switch..case. Also changed ";" to newline. > --- > src/packages/fff/fff-sysupgrade/Makefile | 4 ++-- > src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh | 8 ++++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/src/packages/fff/fff-sysupgrade/Makefile b/src/packages/fff/fff-sysupgrade/Makefile > index ded9852..6c5dd43 100644 > --- a/src/packages/fff/fff-sysupgrade/Makefile > +++ b/src/packages/fff/fff-sysupgrade/Makefile > @@ -1,8 +1,8 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=fff-sysupgrade > -PKG_VERSION:=0.0.1 > -PKG_RELEASE:=1 > +PKG_VERSION:=0.0.2 > +PKG_RELEASE:=2 > > PKG_BUILD_DIR:=$(BUILD_DIR)/fff-sysupgrade > > diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh > index e6bc7d9..f8c6c08 100755 > --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh > +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh > @@ -34,6 +34,10 @@ 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" > > + if [ "$1" = "--script"]; then > + exit 1 > + fi > + > while true; do > echo -ne "Do you want to reinstall the current version? [y/N]\n" > read DO_UPDATE > @@ -65,6 +69,10 @@ if [ $ret -ne 0 ]; then > rm -f ${FILE}* > exit 1 > else > + if [ "$1" = "--script"]; then > + echo -ne "\nStarting firmware upgrade. Don't touch me until I reboot.\n\n\n" > + sysupgrade ${FILE} > + fi > while true; do > read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn > case $yn in >
This makes automatic update via cron jobs possible. Signed-off-by: Jan Kraus <mayosemmel@gmail.com> --- Changes in v2: removed "break", which was accidential copied from switch..case. Also changed ";" to newline. --- src/packages/fff/fff-sysupgrade/Makefile | 4 ++-- src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-)