nixpkgs/pkgs/tools/networking/dhcp/resolv-without-domain.patch

28 lines
987 B
Diff
Raw Normal View History

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