From 84a4f2c81f71fb4243812c2e153aa07a5473c774 Mon Sep 17 00:00:00 2001 From: "Donald A. Cupp Jr" Date: Mon, 17 Feb 2020 12:29:50 -0800 Subject: [PATCH] modified: ts/build/packages/base/bin/update-initrd modified: ts/build/packages/devstation/bin/devcmd --- ts/build/packages/base/bin/update-initrd | 25 ++++++++++++------------ ts/build/packages/devstation/bin/devcmd | 16 +++++++++------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/ts/build/packages/base/bin/update-initrd b/ts/build/packages/base/bin/update-initrd index 6c15544a6e..61a19e31df 100755 --- a/ts/build/packages/base/bin/update-initrd +++ b/ts/build/packages/base/bin/update-initrd @@ -46,10 +46,11 @@ case $METHOD in cp /thinstation/build/boot-images/initrd/lib.squash $bootdir/lib.update fi echo "Update Complete" - exit 0 + echo UPDATE_STATUS=0 > /tmp/update.tmp else echo "Everything is Up to Date" - exit 1 + echo UPDATE_STATUS=1 > /tmp/update.tmp + fi ;; SERVER) @@ -64,10 +65,10 @@ case $METHOD in tftp -g -l vmlinuz -r boot/vmlinuz -b $TFTP_BLOCKSIZE $SERVER_IP tftp -g -l lib.update -r boot/lib.squash -b $TFTP_BLOCKSIZE $SERVER_IP echo "Update Complete" - exit 0 + echo UPDATE_STATUS=0 > /tmp/update.tmp else echo "Everything is Up to Date" - exit 1 + echo UPDATE_STATUS=1 > /tmp/update.tmp fi ;; SH) @@ -82,10 +83,10 @@ case $METHOD in wget http://$SERVER_IP/boot/vmlinuz wget http://$SERVER_IP/boot/lib.squash lib.update echo "Update Complete" - exit 0 + echo UPDATE_STATUS=0 > /tmp/update.tmp else echo "Everything is Up to Date" - exit 1 + echo UPDATE_STATUS=1 > /tmp/update.tmp fi ;; @@ -101,10 +102,10 @@ case $METHOD in tar -xvf /tmp/thindev-default-$TS_VERSION.tar.xz rm /tmp/thindev-default-$TS_VERSION.tar.xz echo "Update Complete" - exit 0 + echo UPDATE_STATUS=0 > /tmp/update.tmp else echo "Everything is up to date" - exit 1 + echo UPDATE_STATUS=1 > /tmp/update.tmp fi ;; PATH) @@ -119,18 +120,18 @@ case $METHOD in cp $LPATH/lib.squash $bootdir/lib.update fi echo "Update Complete" - exit 0 + echo UPDATE_STATUS=0 > /tmp/update.tmp else echo "Invalid Path or missing vmlinuz and initrd" - exit 3 + echo UPDATE_STATUS=3 > /tmp/update.tmp fi else echo "Everything is up to date" - exit 1 + echo UPDATE_STATUS=1 > /tmp/update.tmp fi else echo "Could not check md5" - exit 2 + echo UPDATE_STATUS=2 > /tmp/update.tmp fi ;; esac diff --git a/ts/build/packages/devstation/bin/devcmd b/ts/build/packages/devstation/bin/devcmd index 837ca0e8ff..f7282749a8 100755 --- a/ts/build/packages/devstation/bin/devcmd +++ b/ts/build/packages/devstation/bin/devcmd @@ -27,12 +27,16 @@ x_echo() do_update() { $XTERM_CMD -T "Update initrd" $ARG update-initrd -w - case $? in - 0) x_echo Update "Update Complete" ;; - 1) x_echo Update "No Update Needed" ;; - 2) x_echo Update "Error! Could not check md5" ;; - 3) x_echo Update "Error! No initrd or vmlinuz found" ;; - esac + if [ -e /tmp/update.tmp ]; then + . /tmp/update.tmp + case $UPDATE_STATUS in + 0) x_echo Update "Update Complete, Click OK to reboot" ;reboot;; + 1) x_echo Update "No Update Needed" ;; + 2) x_echo Update "Error! Could not check md5" ;; + 3) x_echo Update "Error! No initrd or vmlinuz found" ;; + esac + rm /tmp/update.tmp + fi } toggle_con()