Invalid domain in /etc/resolv.conf on network install with NetworkManager disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
Fix Released
|
Medium
|
Canonical Foundations Team |
Bug Description
Binary package hint: casper
Ubuntu release: Natty (LiveCD daily image from 2011-01-27).
Package: this is present in Casper 1.254.
What I expected to happen: a domain entry in /etc/resolv.conf without quotes.
What happened instead: /etc/resolv.conf has quotes in the domain entry, causing problems while installing some other packages.
More details about this problem:
In a testing environment, we do network installs using the daily Natty images. One particularity is that we disable NetworkManager by creating an interface entry in /etc/interfaces prior to booting. Thus, scripts/
23networking parses the /tmp/net-
This bug is not usually apparent because most installations use NetworkManager, which takes over resolv.conf, rebuilding it from DHCP information, which it doesn't quote, unlike ipconfig.
Related branches
- Colin Watson (community): Approve
-
Diff: 49 lines (+16/-2) (has conflicts)2 files modifieddebian/changelog (+11/-0)
scripts/casper-bottom/23networking (+5/-2)
description: | updated |
I've looked into this a bit more and found out that the quotes make the resolver misbehave, so they should be stripped, even for the search entry in /etc/resolv.conf.
The proposed fix sanitizes both the search entry, by removing the quotes, and the domain entry, by removing quotes and stripping all but the first domain - at least that's my interpretation of how it should be, from reading resolv.conf(5). I tested it with quoted and unquoted DNSDOMAIN values, and also with multiple domain entries and a single entry (which is the case for most networks).