[SCM] live-build branch, debian-next, updated. debian/3.0_a43-1-1-gb1c3aec

Daniel Baumann daniel at debian.org
Tue Feb 7 09:05:23 UTC 2012


The following commit has been merged in the debian-next branch:
commit b1c3aecd289434670fd488a2ce04d26f3c8d7cd8
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Feb 7 10:04:51 2012 +0100

    Handling /etc/resolv.conf even if it's a dangling symlink like with resolv.conf, thanks to Stephane Graber <stgraber at ubuntu.com> (Closes: #657640).

diff --git a/scripts/build/lb_chroot_resolv b/scripts/build/lb_chroot_resolv
index d405924..d47c3ed 100755
--- a/scripts/build/lb_chroot_resolv
+++ b/scripts/build/lb_chroot_resolv
@@ -51,6 +51,10 @@ case "${1}" in
 			# If you want to have a custom resolv.conf, please
 			# overwrite it with normal local_includes mechanism.
 			Truncate chroot/etc/resolv.conf.orig
+		elif [ -L chroot/etc/resolv.conf ]
+		then
+			# Move resolv.conf aside if it's a symlink (likely resolvconf)
+			mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
 		fi
 
 		if [ -f /etc/resolv.conf ]
@@ -77,7 +81,7 @@ case "${1}" in
 			# Copying local resolv.conf
 			cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf
 			rm -f chroot/etc/resolv.conf.orig
-		elif [ -e chroot/etc/resolv.conf.orig ]
+		elif [ -e chroot/etc/resolv.conf.orig ] || [ -L chroot/etc/resolv.conf.orig ]
 		then
 			# Restoring resolv file or symlink
 			mv chroot/etc/resolv.conf.orig chroot/etc/resolv.conf

-- 
live-build



More information about the debian-live-changes mailing list