Merge lp:~timrchavez/live-build/lb-sg-2.x-resolvconf-cleanup into lp:~ce-infrastructure/live-build/lb-sg-2.x

Proposed by Timothy R. Chavez
Status: Merged
Approved by: Timothy R. Chavez
Approved revision: 1600
Merged at revision: 1600
Proposed branch: lp:~timrchavez/live-build/lb-sg-2.x-resolvconf-cleanup
Merge into: lp:~ce-infrastructure/live-build/lb-sg-2.x
Diff against target: 52 lines (+19/-1)
2 files modified
debian/changelog (+8/-0)
scripts/build/lb_chroot_resolv (+11/-1)
To merge this branch: bzr merge lp:~timrchavez/live-build/lb-sg-2.x-resolvconf-cleanup
Reviewer Review Type Date Requested Status
OEM Solutions Release Engineers Pending
Review via email: mp+134365@code.launchpad.net

Description of the change

  * scripts/build/lb_chroot_resolv
    - Add checks for the case where resolv.conf is a symlink and clean-up
      any resolvconf pollution (backported from 3.0~a24-1ubuntu23)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2012-06-18 23:11:05 +0000
+++ debian/changelog 2012-11-14 20:14:21 +0000
@@ -1,3 +1,11 @@
1live-build (2.0.12-2cesg8) lucid; urgency=low
2
3 * scripts/build/lb_chroot_resolv
4 - Add checks for the case where resolv.conf is a symlink and clean-up
5 any resolvconf pollution (backported from 3.0~a24-1ubuntu23)
6
7 -- Timothy Chavez <timothy.chavez@canonical.com> Tue, 13 Nov 2012 14:15:13 -0600
8
1live-build (2.0.12-2cesg7) lucid; urgency=low9live-build (2.0.12-2cesg7) lucid; urgency=low
210
3 * data/debian-cd/quantal:11 * data/debian-cd/quantal:
412
=== modified file 'scripts/build/lb_chroot_resolv'
--- scripts/build/lb_chroot_resolv 2011-03-09 18:17:33 +0000
+++ scripts/build/lb_chroot_resolv 2012-11-14 20:14:21 +0000
@@ -51,6 +51,10 @@
51 # If you want to have a custom resolv.conf, please51 # If you want to have a custom resolv.conf, please
52 # overwrite it with normal local_includes mechanism.52 # overwrite it with normal local_includes mechanism.
53 Truncate chroot/etc/resolv.conf.orig53 Truncate chroot/etc/resolv.conf.orig
54 elif [ -L chroot/etc/resolv.conf ]
55 then
56 # Move resolv.conf aside if it's a symlink (likely resolvconf)
57 mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
54 fi58 fi
5559
56 if [ -f /etc/resolv.conf ]60 if [ -f /etc/resolv.conf ]
@@ -77,7 +81,7 @@
77 # Copying local resolv.conf81 # Copying local resolv.conf
78 cp -a config/chroot_local-includes/etc/resolv.conf chroot/etc/resolv.conf82 cp -a config/chroot_local-includes/etc/resolv.conf chroot/etc/resolv.conf
79 rm -f chroot/etc/resolv.conf.orig83 rm -f chroot/etc/resolv.conf.orig
80 elif [ -e chroot/etc/resolv.conf.orig ]84 elif [ -e chroot/etc/resolv.conf.orig ] || [ -L chroot/etc/resolv.conf.orig ]
81 then85 then
82 # Restoring resolv file or symlink86 # Restoring resolv file or symlink
83 mv chroot/etc/resolv.conf.orig chroot/etc/resolv.conf87 mv chroot/etc/resolv.conf.orig chroot/etc/resolv.conf
@@ -86,6 +90,12 @@
86 Truncate chroot/etc/resolv.conf90 Truncate chroot/etc/resolv.conf
87 fi91 fi
8892
93 # Clean up resolvconf's pollution
94 if [ -d chroot/etc/resolvconf/resolv.conf.d ]; then
95 rm -f chroot/etc/resolvconf/resolv.conf.d/original
96 rm -f chroot/etc/resolvconf/resolv.conf.d/tail
97 fi
98
89 # Removing stage file99 # Removing stage file
90 rm -f .stage/chroot_resolv100 rm -f .stage/chroot_resolv
91 ;;101 ;;

Subscribers

People subscribed via source and target branches