tar2fs: clean fstab

Should be done this way in the first place it seems.
This commit is contained in:
Anton Midyukov 2019-07-12 00:06:01 +07:00 committed by Michael Shigorin
parent 2e70a8f895
commit 07559bc94a

View File

@ -225,6 +225,8 @@ KVERSIONS="$(chroot "$ROOTFS" rpm -qa 'kernel-image*' \
[ -n "$KVERSIONS" ] || fatal "unable to deduce kernel version"
rm -f .origver
# clean fstab
sed -i "/LABEL=ROOT/d" "$ROOTFS/etc/fstab"
# ...target device too
sed -i "s,$LOOPROOT,$ROOTDEV," "$ROOTFS/etc/fstab"
@ -256,7 +258,6 @@ popd
# for u-boot
if [ "$BOOTLOADER" = "uboot" ]; then
EXTLINUX_CONF="$ROOTFS/boot/extlinux/extlinux.conf"
sed -i "/LABEL=ROOT/d" "$ROOTFS/etc/fstab"
sed -i "s/LABEL=ROOT/$ROOTDEV/g" "$EXTLINUX_CONF"
fi