From 571d99e74d42fac830069c2ca2fbd5f505613dc6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 9 Feb 2017 04:01:36 +0100 Subject: add dual-boot / fwupdate for systems with grub-support --- package/fwupdate/src/fwupdate | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'package/fwupdate/src/fwupdate') diff --git a/package/fwupdate/src/fwupdate b/package/fwupdate/src/fwupdate index 7a73115e0..1efe08339 100755 --- a/package/fwupdate/src/fwupdate +++ b/package/fwupdate/src/fwupdate @@ -44,7 +44,7 @@ CHECK_SUM_NEW_SYSTEM=$(tar -xf $FIRMWARE $FW_NAME -O | sha256sum - |cut -d\ -f1 echo "Compare the checksums ..." if [ "X$CHECK_SUM_NEW_SYSTEM" = "X$CHECK_SUM_UPDATE_FILE" ]; then - echo "Checksum verified (they match): " + echo "Checksum verified (they match) ..." else echo "Checksum does not match!" echo "${CHECK_SUM_UPDATE_FILE} " @@ -130,8 +130,18 @@ fi cd / umount $MOUNTPART -mount -o remount,rw /boot +grep /boot /proc/mounts 2>/dev/null +if [ $? -eq 0 ]; then + mount -o remount,rw /boot +else + mount /dev/sda1 /boot +fi grub-reboot $OS -mount -o remount,ro /boot +grep /boot /proc/mounts 2>/dev/null +if [ $? -eq 0 ]; then + mount -o remount,ro /boot +else + umount /boot +fi sync echo "Reboot now to the updated system $OS" -- cgit v1.2.3