X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fmkefi-agl.sh;h=c44ecedde53e757c794ee98a593dc50197fc4178;hb=e2bee9a16884172b2c92a5d86c1f19888611407e;hp=14ade366eacab00f7663006aef6d57169873ede3;hpb=aad0373e5a247fa99bedd0a982d028da36c1e760;p=AGL%2Fmeta-agl.git diff --git a/scripts/mkefi-agl.sh b/scripts/mkefi-agl.sh index 14ade366e..c44ecedde 100755 --- a/scripts/mkefi-agl.sh +++ b/scripts/mkefi-agl.sh @@ -64,7 +64,7 @@ cleanup() { if [ -d "$TMPDIR" ]; then rm -rf "$TMPDIR" || error "Failed to remove $TMPDIR" fi - [ -f "$TMP_DIR/TMP-AGL-wic-image.wic" ] || rm -f $TMP_DIR/TMP-AGL-wic-image.wic + [ -f "$TMP_DIR/TMP-AGL-wic-image.wic" ] && rm -f $TMP_DIR/TMP-AGL-wic-image.wic } trap 'die "Signal Received, Aborting..."' HUP INT TERM @@ -352,6 +352,7 @@ ROOTFS_DISKID=$(fdisk -l "$DEVICE" | grep -e "Disk identifier" | sed -n 's/^.*Di if [ $ROOTFS_DISKID = "" ]; then die "Failed to read DISKID" fi +BOOTFS_PARTUUID="$ROOTFS_DISKID-01" ROOTFS_PARTUUID="$ROOTFS_DISKID-02" debug "PARTUUID for ROOTFS is $ROOTFS_PARTUUID" @@ -500,6 +501,8 @@ else fi debug "removing any swap entry in /etc/fstab" sed --in-place '/swap/d' $ROOTFS_MNT/etc/fstab +debug "fixing PARTUUID for /boot" +sed --in-place -e "s#PARTUUID=[0-9a-z-]\+\t/boot#${BOOTFS_PARTUUID}\t/boot#" $ROOTFS_MNT/etc/fstab printf "flushing data on removable device. May take a while ... " sync --file-system $ROOTFS_MNT