fi
/sbin/fsck -y $DATAFS
- # We don't mount $DATAFS here, platform mounts it,
- # because if it's an upgrade, we may need to create a checkpoint
- # /bin/mount $DATAFS $DATAFS_MNT
+ if [ "$BOOT_MODE" == "fota" ]; then
+ /usr/share/upgrade/update-checkpoint-create.sh "$ROOTFS_MNT" system-data
+ else
+ /bin/mount $DATAFS $DATAFS_MNT
+ fi
}
if [ x"$DATAFS" = "x" ]; then return; fi
if [ "$NEED_RESIZEFS" = "0" ]; then return; fi
- # We want to create a flag indicating that resize2fs has already been
- # executed, but DATAFS partition will be mounted by systemd later. So we
- # have to do this kind of ugly mouting and unmounting, to be able to create
- # flag, and then for systemd to mount the partition in the normal way or
- # via dm-bow (during an upgrade).
- # Fortunately, it will only execute once, on the first boot after the
- # images have been flashed.
- /bin/mount "$DATAFS" "$DATAFS_MNT"
-
echo " " > ${DATAFS_MNT}/var/.resizefs_done
-
- /bin/umount "$DATAFS_MNT"
}
wait_find_partitions
restore_partitions
check_flags
+check_bootmode
process_rootfs
process_datafs
load_kernel_modules
pivot_root
-check_bootmode
change_root $@
# WARNING! never rearch