summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-12-23 21:26:01 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:29 +0100
commitd725d86274ffc0b55e3ebd9631349592f22bae0f (patch)
treeae731064ea316ab3378a74d5992a8d82a6622020
parent5dafe2f105df105a2656e47e236099a688ee8f4a (diff)
downloadvyos-live-build-d725d86274ffc0b55e3ebd9631349592f22bae0f.tar.gz
vyos-live-build-d725d86274ffc0b55e3ebd9631349592f22bae0f.zip
Don't fail if resolv.conf is a symlink, thanks to David Madore <david.madore@ens.fr> (Closes: #457595).
-rwxr-xr-xhelpers/lh_chroot_resolv8
1 files changed, 4 insertions, 4 deletions
diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv
index bc53c6847..36a1a1bb6 100755
--- a/helpers/lh_chroot_resolv
+++ b/helpers/lh_chroot_resolv
@@ -49,9 +49,9 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- if [ -f chroot/etc/resolv.conf ]
+ if [ -e chroot/etc/resolv.conf ]
then
- # Save resolv file
+ # Save resolv file or symlink
mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
fi
@@ -74,9 +74,9 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- if [ -f chroot/etc/resolv.conf.orig ]
+ if [ -e chroot/etc/resolv.conf.orig ]
then
- # Restoring resolv file
+ # Restoring resolv file or symlink
mv chroot/etc/resolv.conf.orig chroot/etc/resolv.conf
else
# Truncating resolv file