aboutsummaryrefslogtreecommitdiffstats
path: root/package/system
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2016-08-02 22:29:31 +0200
committerFelix Fietkau <nbd@nbd.name>2016-08-04 18:19:46 +0200
commit3004298e625c47537877bfd1e95806fad7c39f27 (patch)
treea496f5d431902c98f1151258b0aab229dfb5a953 /package/system
parent188517144e779086355d2ac287944e23af54d024 (diff)
downloadupstream-3004298e625c47537877bfd1e95806fad7c39f27.tar.gz
upstream-3004298e625c47537877bfd1e95806fad7c39f27.tar.bz2
upstream-3004298e625c47537877bfd1e95806fad7c39f27.zip
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/system')
-rw-r--r--package/system/procd/files/nand.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 8b0564dca2..70b9af559d 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -198,6 +198,7 @@ nand_do_upgrade_success() {
sync
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
+ umount -a
reboot -f
}
@@ -213,6 +214,7 @@ nand_upgrade_ubinized() {
if [ ! "$mtdnum" ]; then
echo "cannot find mtd device $CI_UBIPART"
+ umount -a
reboot -f
fi