tar2fs: avoid duplicate fstab entry
This commit fixes duplication of root device entry in /etc/fstab and changes LABEL=ROOT entry with the proper one if found. Apparently this didn't hurt qemu images much though...
This commit is contained in:
parent
caee317e3e
commit
2ac26880f1
@ -224,7 +224,11 @@ tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
|
||||
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
|
||||
|
||||
# loop device so lilo could work...
|
||||
if grep -qe "[[:space:]]/[[:space:]]" "$ROOTFS/etc/fstab"; then \
|
||||
sed -i "s/LABEL=ROOT/$ROOTDEV/" "$ROOTFS/etc/fstab"
|
||||
else
|
||||
echo "$ROOTDEV / $ROOTFSTYPE relatime 1 1" >> "$ROOTFS/etc/fstab"
|
||||
fi
|
||||
|
||||
# target device at once
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user