Remove "target" occurences in future fstab file
This commit is contained in:
parent
e8951c437b
commit
637d61b44f
|
@ -142,6 +142,7 @@ if [ "${manage_btrfs}" -eq 0 ]; then
|
||||||
|
|
||||||
#### root
|
#### root
|
||||||
grep "btrfs" /etc/mtab >> /tmp/target.fstab
|
grep "btrfs" /etc/mtab >> /tmp/target.fstab
|
||||||
|
|
||||||
else ### Or for ext4, create mountpoint and mount LV
|
else ### Or for ext4, create mountpoint and mount LV
|
||||||
#### root
|
#### root
|
||||||
printf '%b\n' "/dev/mapper/${vgname}-root / ext4 defaults 0 0" >> /tmp/target.fstab
|
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
|
printf '%b\n' "/dev/mapper/${vgname}-var /var ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
fi
|
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
|
if [ "${manage_extra_lv}" -eq 0 ]; then
|
||||||
### Extra bkp LV
|
### Extra bkp LV
|
||||||
mkdir -p -- /target/srv/backup
|
mkdir -p -- /target/srv/backup
|
||||||
|
|
Loading…
Reference in New Issue