Merge lp:~roadmr/ubuntu/precise/casper/973794 into lp:ubuntu/precise/casper

Proposed by Daniel Manrique
Status: Rejected
Rejected by: St├ęphane Graber
Proposed branch: lp:~roadmr/ubuntu/precise/casper/973794
Merge into: lp:ubuntu/precise/casper
Diff against target: 48 lines (+13/-8)
2 files modified
debian/changelog (+6/-0)
scripts/casper-bottom/23networking (+7/-8)
To merge this branch: bzr merge lp:~roadmr/ubuntu/precise/casper/973794
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+100893@code.launchpad.net

Description of the change

In order to address bug 973794, this code replaces trying to parse and clean up the /tmp/net-${DEVICE}.conf file with simply sourcing the file and using the resulting, now properly-unquoted, environment variables.

See this merge request for a more detailed discussion and Colin Watson's hint that the above is The Way (tm) to handle these files.

https://code.launchpad.net/~roadmr/ubuntu/oneiric/casper/809885/+merge/67868

To post a comment you must log in.
Revision history for this message
St├ęphane Graber (stgraber) wrote :

Rejecting the branch as the bug has been fixed in a different way.

Thanks

Unmerged revisions

1011. By Daniel Manrique

scripts/casper-bottom/23networking: source file written by ipconfig and
use the resulting environment variables to build resolv.conf, avoids stray
single-quote in 'domain' entry (LP: #973794).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-04-03 01:36:50 +0000
3+++ debian/changelog 2012-04-04 23:16:34 +0000
4@@ -1,9 +1,15 @@
5 casper (1.314) precise; urgency=low
6
7+ [ Luke Yelavich ]
8 * bin/casper-a11y-enable: Call dbus-send with the --print-reply command-line
9 argument, and send the output to null, as we don't need it. For some
10 reason dbus-send only executes our commands when --print-reply is given.
11
12+ [ Daniel Manrique ]
13+ * scripts/casper-bottom/23networking: source file written by ipconfig and
14+ use the resulting environment variables to build resolv.conf, avoids stray
15+ single-quote in 'domain' entry (LP: #973794).
16+
17 -- Luke Yelavich <themuso@ubuntu.com> Tue, 03 Apr 2012 11:36:32 +1000
18
19 casper (1.313) precise; urgency=low
20
21=== modified file 'scripts/casper-bottom/23networking'
22--- scripts/casper-bottom/23networking 2012-03-05 20:38:22 +0000
23+++ scripts/casper-bottom/23networking 2012-04-04 23:16:34 +0000
24@@ -77,17 +77,16 @@
25 if [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ]; then
26 # create a resolv.conf if it is not present
27 cp /tmp/net-"${DEVICE}".conf /root/var/log/netboot.config
28- #ipconfig quotes DNSDOMAIN, quotes need to be removed for a correct resolv.conf
29- rc_search="$(sed -n "s/^DNSDOMAIN='\(.*\)'/\1/p" /tmp/net-"${DEVICE}".conf)"
30+ #ipconfig-generated file contains sourceable environment variables
31+ . /tmp/net-"${DEVICE}".conf
32+ rc_search="${DNSDOMAIN}"
33 #search might contain multiple entries but domain should only have one.
34- rc_domain="$(sed -n "s/^DNSDOMAIN='\([^ ]*\).*/\1/p" /tmp/net-"${DEVICE}".conf)"
35- rc_server0="$(sed -n "s/^IPV4DNS0='\(.*\)'/\1/p" /tmp/net-"${DEVICE}".conf)"
36- rc_server1="$(sed -n "s/^IPV4DNS1='\(.*\)'/\1/p" /tmp/net-"${DEVICE}".conf)"
37- rc_server0="nameserver ${rc_server0}"
38- if [ "${rc_server1}" = "0.0.0.0" ]; then
39+ rc_domain="$(echo "${DNSDOMAIN}" | sed -n -e 's/^\([^ ]\+\) *.*/\1/p')"
40+ rc_server0="nameserver ${IPV4DNS0}"
41+ if [ "${IPV4DNS1}" = "0.0.0.0" ]; then
42 rc_server1=""
43 else
44- rc_server1="nameserver ${rc_server1}"
45+ rc_server1="nameserver ${IPV4DNS1}"
46 fi
47
48 # Deal with resolvconf

Subscribers

People subscribed via source and target branches