[04/17] meta-isar: deploy-image: Drop umount attempt after installation

Message ID 62731074b0405eb110b1c2bdc1543d2769ccdac7.1719927511.git.jan.kiszka@siemens.com
State Accepted, archived
Headers show
Series Reworks, fixes and unattended mode for image installer | expand

Commit Message

Jan Kiszka July 2, 2024, 1:38 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Under systemd, this fails because /install is still busy. In that setup,
systemd will take care of properly unmounting this partition anyway on
reboot. In other setups, the caller should take care.

This also obsoletes the "set -e" because no commands are left that can
produce errors and are not checked explicitly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../recipes-installer/deploy-image/files/deploy-image-wic.sh | 5 -----
 1 file changed, 5 deletions(-)

Patch

diff --git a/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh
index 12c1eea2..9a1fa651 100644
--- a/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh
+++ b/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh
@@ -90,7 +90,6 @@  fi
 TARGET_DEVICE_SIZE=$(lsblk --nodeps --noheadings -o SIZE /dev/"$TARGET_DEVICE")
 dialog --msgbox "Start installing '$DISK_IMAGE' to '$TARGET_DEVICE'(Size: '$TARGET_DEVICE_SIZE' )." 7 60
 
-set -e
 bmap_options=""
 if [ -z "$DISK_BMAP" ]; then
     bmap_options="--nobmap"
@@ -100,9 +99,5 @@  if ! bmaptool copy "${bmap_options}" "$DISK_IMAGE" "/dev/${TARGET_DEVICE}"; then
     exit 1
 fi
 
-# we need to umount before reboot to avoid
-# data corruption due to the use of vfat.
-umount "$installdata"
-sync
 dialog --title "Reboot" --msgbox "Installation is successful. System will be rebooted. Please remove the USB stick." 7 60
 exit 0