Skip to content

Commit

Permalink
modified: ts/build/packages/base/bin/update-initrd
Browse files Browse the repository at this point in the history
	modified:   ts/build/packages/devstation/bin/devcmd
  • Loading branch information
Doncuppjr committed Feb 17, 2020
1 parent d9f6a11 commit 84a4f2c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
25 changes: 13 additions & 12 deletions ts/build/packages/base/bin/update-initrd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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

;;
Expand All @@ -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)
Expand All @@ -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
16 changes: 10 additions & 6 deletions ts/build/packages/devstation/bin/devcmd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 84a4f2c

Please sign in to comment.