forked from mirrors/nixpkgs
7f1a438ca8
* Dhcp client script: create resolv.conf even if the DHCP server doesn't provide a domain name, only a list of name servers. (The QEMU DHCP server does this.) svn path=/nixpkgs/trunk/; revision=7920
28 lines
987 B
Diff
28 lines
987 B
Diff
diff -rc dhcp-3.0.5-orig/client/scripts/linux dhcp-3.0.5/client/scripts/linux
|
|
*** dhcp-3.0.5-orig/client/scripts/linux Fri Nov 15 02:09:09 2002
|
|
--- dhcp-3.0.5/client/scripts/linux Tue Feb 20 15:02:34 2007
|
|
***************
|
|
*** 23,31 ****
|
|
# of the $1 in its args.
|
|
|
|
make_resolv_conf() {
|
|
! if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
|
|
! echo search $new_domain_name >/etc/resolv.conf
|
|
chmod 644 /etc/resolv.conf
|
|
for nameserver in $new_domain_name_servers; do
|
|
echo nameserver $nameserver >>/etc/resolv.conf
|
|
done
|
|
--- 23,34 ----
|
|
# of the $1 in its args.
|
|
|
|
make_resolv_conf() {
|
|
! if [ x"$new_domain_name_servers" != x ]; then
|
|
! echo -n >/etc/resolv.conf
|
|
chmod 644 /etc/resolv.conf
|
|
+ if [ "x$new_domain_name" != x ]; then
|
|
+ echo search $new_domain_name >>/etc/resolv.conf
|
|
+ fi
|
|
for nameserver in $new_domain_name_servers; do
|
|
echo nameserver $nameserver >>/etc/resolv.conf
|
|
done
|