Merge lp:~smoser/ubuntu/oneiric/isc-dhcp/lp857524 into lp:ubuntu/oneiric/isc-dhcp
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Scott Moser | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~smoser/ubuntu/oneiric/isc-dhcp/lp857524 | ||||
Merge into: | lp:ubuntu/oneiric/isc-dhcp | ||||
Diff against target: |
134 lines (+41/-28) 2 files modified
debian/changelog (+6/-0) debian/dhclient-script.linux (+35/-28) |
||||
To merge this branch: | bzr merge lp:~smoser/ubuntu/oneiric/isc-dhcp/lp857524 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson | Approve | ||
Review via email: mp+76791@code.launchpad.net |
Description of the change
fix updating of /etc/resolv.conf for read-only /etc/
This makes the following changes:
* instead of writing to a temp file in /etc/, write to a temp file in
same directory as resolv.conf (which might be different if
/etc/resolv.conf is a link)
* replace the multiple '>>' with a single '>' and braces. This means
the temp file will be opened for write once rather than append many times.
* use 'grep -i' rather than 'sed' to get the old nameserver entries from
existing resolv.conf. This is how the linux.udeb does it, and I find it more
clean.
* changes 'wait_for_rw' to take a file argument rather than hard coding /etc
and then actually tests that that file is writable by opening it for append
Won't this result in potential problems while the /etc/resolv.conf file is in the process of being written to? Having the mv from the temp file results in it being atomic...