summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-01-10 21:18:53 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:39 +0100
commit4f00cd3e8218027e0a36e46f02a2cd0b9a9feb88 (patch)
treeca9c49756ba6da1b10eb48371c67af1fc4074663
parent03e1b85dc49eee90c2ced03aa6488c4b262a89bf (diff)
downloadvyos-live-build-4f00cd3e8218027e0a36e46f02a2cd0b9a9feb88.tar.gz
vyos-live-build-4f00cd3e8218027e0a36e46f02a2cd0b9a9feb88.zip
Truncating resolv.conf created during bootstrap stage, otherwise we'll end up with a local resolv.conf in the final image. Thanks to Ben Armstrong <synrg@debian.org>.
-rwxr-xr-xhelpers/lh_chroot_resolv7
1 files changed, 7 insertions, 0 deletions
diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv
index bad23577f..afa303680 100755
--- a/helpers/lh_chroot_resolv
+++ b/helpers/lh_chroot_resolv
@@ -48,6 +48,13 @@ case "${1}" in
then
# Save resolv file or symlink
mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
+
+ # Also truncate it, otherwise we'll end up with the one
+ # created by debootstrap in the final image.
+ #
+ # If you want to have a custom resolv.conf, please
+ # overwrite it with normal local_includes mechanism.
+ Truncate chroot/etc/resolv.conf.orig
fi
if [ -f /etc/resolv.conf ]