backcompat
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
1d42e4afcb
commit
73cad9dee2
2 changed files with 10 additions and 2 deletions
|
@ -42,6 +42,12 @@ mountpoint -q "${chroot}/dev/pts" \
|
||||||
mountpoint -q "${chroot}/tmp" \
|
mountpoint -q "${chroot}/tmp" \
|
||||||
|| mount -t tmpfs -o mode=1777,strictatime,nodev,nosuid tmpfs "${chroot}/tmp"
|
|| mount -t tmpfs -o mode=1777,strictatime,nodev,nosuid tmpfs "${chroot}/tmp"
|
||||||
|
|
||||||
|
if [ -f "${chroot}/etc/resolv.conf" ]; then
|
||||||
|
# if file exists, bind mount over it
|
||||||
mountpoint -q "${chroot}/etc/resolv.conf" \
|
mountpoint -q "${chroot}/etc/resolv.conf" \
|
||||||
|| mount --bind -o ro /etc/resolv.conf "${chroot}/etc/resolv.conf"
|
|| mount --bind -o ro /etc/resolv.conf "${chroot}/etc/resolv.conf"
|
||||||
|
else
|
||||||
|
# otherwise copy
|
||||||
|
cp /etc/resolv.conf "${chroot}/etc/resolv.conf"
|
||||||
|
fi
|
||||||
DONE
|
DONE
|
||||||
|
|
|
@ -28,6 +28,8 @@ umount -l "${chroot}/sys"
|
||||||
umount -l "${chroot}/proc"
|
umount -l "${chroot}/proc"
|
||||||
if mountpoint -q "${chroot}/etc/resolv.conf"; then
|
if mountpoint -q "${chroot}/etc/resolv.conf"; then
|
||||||
umount "${chroot}/etc/resolv.conf"
|
umount "${chroot}/etc/resolv.conf"
|
||||||
|
else
|
||||||
|
rm -rf "${chroot}/etc/resolv.conf"
|
||||||
fi
|
fi
|
||||||
if [ -d "${chroot}/etc/resolvconf/resolv.conf.d" ]; then
|
if [ -d "${chroot}/etc/resolvconf/resolv.conf.d" ]; then
|
||||||
# ensure /etc/resolvconf/resolv.conf.d/tail is not linked to \
|
# ensure /etc/resolvconf/resolv.conf.d/tail is not linked to \
|
||||||
|
|
Loading…
Reference in a new issue