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.

45 lines
1.8 KiB

# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../dhcp/dhclient-script-no-domain.patch
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---
diff -r -u dhcp-3.0.2rc3/client/scripts/linux dhcp-3.0.2rc3-new/client/scripts/linux
--- dhcp-3.0.2rc3/client/scripts/linux 2002-11-15 02:09:09.000000000 +0100
+++ dhcp-3.0.2rc3-new/client/scripts/linux 2005-01-16 00:13:49.664021176 +0100
@@ -22,10 +22,12 @@
# 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
# 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
+function make_resolv_conf() {
+ if [ x"$new_domain_name_servers" != x ]; then
+ echo "# This file was generated by /sbin/dhclient-script" > /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
@@ -33,7 +35,7 @@
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
-exit_with_hooks() {
+function exit_with_hooks() {
exit_status=$1
if [ -f /etc/dhclient-exit-hooks ]; then
. /etc/dhclient-exit-hooks