From 637d61b44ff5736f969c628c53ffec80c74f593d Mon Sep 17 00:00:00 2001 From: Gardouille Date: Wed, 21 Oct 2020 09:37:22 +0200 Subject: [PATCH] Remove "target" occurences in future fstab file --- debian/chroot.install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/chroot.install b/debian/chroot.install index 502c396..d055533 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -142,6 +142,7 @@ if [ "${manage_btrfs}" -eq 0 ]; then #### root grep "btrfs" /etc/mtab >> /tmp/target.fstab + else ### Or for ext4, create mountpoint and mount LV #### root printf '%b\n' "/dev/mapper/${vgname}-root / ext4 defaults 0 0" >> /tmp/target.fstab @@ -172,6 +173,10 @@ else ### Or for ext4, create mountpoint and mount LV printf '%b\n' "/dev/mapper/${vgname}-var /var ext4 defaults 0 0" >> /tmp/target.fstab fi +### Ensure to remove any occurence to /target mountpoint +sed -i 's;target/;;' /tmp/target.fstab +sed -i 's;target;;' /tmp/target.fstab + if [ "${manage_extra_lv}" -eq 0 ]; then ### Extra bkp LV mkdir -p -- /target/srv/backup