Chroot: ensure to have a mountpoint for the root…

This commit is contained in:
Jeremy Gardais 2019-04-04 00:23:01 +02:00
parent 8bac33afa1
commit 05a3de15ca
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 3 additions and 2 deletions

View File

@ -196,8 +196,9 @@ grep swap /target/etc/fstab || echo "/dev/mapper/${vgname}-swap swap swap
### Add extra tmpfs mount point ### Add extra tmpfs mount point
grep "/var/tmp" /target/etc/fstab || echo "/tmp /var/tmp none rw,bind,size=1M,mode=1777 0 0" >> /target/etc/fstab grep "/var/tmp" /target/etc/fstab || echo "/tmp /var/tmp none rw,bind,size=1M,mode=1777 0 0" >> /target/etc/fstab
### Remove all occurrences to /target ### Remove all occurrences to target and avoid double slashs
sed -i 's;/target;;g' /target/etc/fstab sed -i 's;target;;g' /target/etc/fstab
sed -i 's;//;;g' /target/etc/fstab
## }}} ## }}}
## Network {{{ ## Network {{{
net_device=$(ip r | grep "^default" | head -1 | cut -d" " -f5) net_device=$(ip r | grep "^default" | head -1 | cut -d" " -f5)