diff options
author | Mathias Kresin <dev@kresin.me> | 2016-08-02 22:29:31 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-08-04 18:19:46 +0200 |
commit | 3004298e625c47537877bfd1e95806fad7c39f27 (patch) | |
tree | a496f5d431902c98f1151258b0aab229dfb5a953 /package/base-files | |
parent | 188517144e779086355d2ac287944e23af54d024 (diff) | |
download | mtk-20170518-3004298e625c47537877bfd1e95806fad7c39f27.zip mtk-20170518-3004298e625c47537877bfd1e95806fad7c39f27.tar.gz mtk-20170518-3004298e625c47537877bfd1e95806fad7c39f27.tar.bz2 |
sysupgrade: unmount filesystems before reboot
sysupgrade immediately reboots after flashing an image and doesn't
allow to unmount filesystems. At least in case the image used for
sysupgrade is stored on a FAT formatted usb flash drive, the following
warning is printed during the next mount of the flash drive:
FAT-fs (sda1): Volume was not properly unmounted. Some data may be
corrupt. Please run fsck.
Although a data corruption during read operations is unlikely, there is
no need to scare the users.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/files/lib/upgrade/common.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index ea03f77..bed9c18 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -243,6 +243,7 @@ do_upgrade() { [ -n "$DELAY" ] && sleep "$DELAY" ask_bool 1 "Reboot" && { v "Rebooting system..." + umount -a reboot -f sleep 5 echo b 2>/dev/null >/proc/sysrq-trigger |