OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../dhcp/dhclient-script-no-domain.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. diff -r -u dhcp-3.0.2rc3/client/scripts/linux dhcp-3.0.2rc3-new/client/scripts/linux
  17. --- dhcp-3.0.2rc3/client/scripts/linux 2002-11-15 02:09:09.000000000 +0100
  18. +++ dhcp-3.0.2rc3-new/client/scripts/linux 2005-01-16 00:13:49.664021176 +0100
  19. @@ -22,10 +22,12 @@
  20. # 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
  21. # of the $1 in its args.
  22. -make_resolv_conf() {
  23. - if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
  24. - echo search $new_domain_name >/etc/resolv.conf
  25. - chmod 644 /etc/resolv.conf
  26. +function make_resolv_conf() {
  27. + if [ x"$new_domain_name_servers" != x ]; then
  28. + echo "# This file was generated by /sbin/dhclient-script" > /etc/resolv.conf
  29. + if [ "x$new_domain_name" != x ]; then
  30. + echo search $new_domain_name >>/etc/resolv.conf
  31. + fi
  32. for nameserver in $new_domain_name_servers; do
  33. echo nameserver $nameserver >>/etc/resolv.conf
  34. done
  35. @@ -33,7 +35,7 @@
  36. }
  37. # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
  38. -exit_with_hooks() {
  39. +function exit_with_hooks() {
  40. exit_status=$1
  41. if [ -f /etc/dhclient-exit-hooks ]; then
  42. . /etc/dhclient-exit-hooks