[prev in list] [next in list] [prev in thread] [next in thread]
List: dhcp-server
Subject: Re: NIS patch for dhcp client (fwd)
From: Justin Moore <justin () cs ! duke ! edu>
Date: 2003-01-29 20:24:26
[Download RAW message or body]
*** From dhcp-server -- To unsubscribe, see the end of this message. ***
---------- Forwarded message ----------
Date: 29 Jan 2003 15:14:23 -0500
From: Eloy A. Paris <peloy@chapus.net>
To: Justin Moore <justin@cs.duke.edu>
Subject: Re: NIS patch for dhcp client
Hi Justin,
Thanks for the patch. Could you send this patch to the dhcp-server
mailing list? That way people can comment on it and I can see the
comments and decide if it is safe to include it in the official Debian
package.
The information about the dhcp-server mailing list can be found at
www.isc.org.
Cheers,
Eloy.-
Justin Moore <justin@cs.duke.edu> writes:
> First-time debian contributor, I added support for setting NIS
> domains in the DHCP client from a DHCP packet. I'm sure this isn't the
> proper channel for changes like this (is this an ISC-bound patch?) but
> you were listed as the maintainer.
>
> Patch is against version dhcp-3.0.1betaRC4, with debian patches also
> applied (dhcp_3.0.1betaRC4-1.diff).
>
> -jdm
>
> Department of Computer Science, Duke University, Durham, NC 27708-0129
> Email: justin@cs.duke.edu
> Web: http://www.cs.duke.edu/~justin/
-- Attached file included as plaintext by Ecartis --
-- File: dhcp-3.0.1betaRC4+linux-nis-patch.diff
-- Desc: NIS domain support
diff -rNu dhcp-3.0.1betaRC4.orig/client/scripts/linux dhcp-3.0.1betaRC4/client/scripts/linux
--- dhcp-3.0.1betaRC4.orig/client/scripts/linux Tue Jan 28 19:49:28 2003
+++ dhcp-3.0.1betaRC4/client/scripts/linux Tue Jan 28 19:48:24 2003
@@ -31,6 +31,25 @@
fi
}
+make_domainname() {
+ current_nis_domain=`domainname`
+ if [ "x$new_nis_domain" != x ] && [ x"$new_nis_servers" != x ]; then
+ if [ x$current_nis_domain = x ] || \
+ [ x$current_nis_domain = x$none ] || \
+ [ x$current_nis_domain = x$old_nis_domain ]; then
+ if [ x$current_nis_domain = x ] || \
+ [ x$new_nis_domain != x$old_nis_domain ]; then
+ domainname $new_nis_domain
+ echo $new_nis_domain > /etc/defaultdomain
+ echo -n "" > /etc/yp.conf
+ for nisserver in $new_nis_servers ; do
+ echo domain $new_nis_domain server $nisserver >> /etc/yp.conf
+ done
+ fi
+ fi
+ fi
+}
+
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
exit_with_hooks() {
exit_status=$1
@@ -146,6 +165,7 @@
route add -host $alias_ip_address $interface:0
fi
make_resolv_conf
+ make_domainname
exit_with_hooks 0
fi
-----------------------------------------------------------------------
List Archives : http://www.isc.org/ml-archives/dhcp-server/
Unsubscribe : http://www.isc.org/dhcp-lists.html
-or- : mailto:dhcp-server-request@isc.org?Subject=unsubscribe
-----------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic