[prev in list] [next in list] [prev in thread] [next in thread]
List: dhcp-client
Subject: Request for a slight addition to the distribution
From: Chittaranjan Mandal <chitta () cse ! iitkgp ! ernet ! in>
Date: 2002-01-06 9:31:47
[Download RAW message or body]
*** From dhcp-client -- To unsubscribe, see the end of this message. ***
Please find attached sample files for dhclient.conf and
dhclient-exit-hooks.
The supplied dhclient-exit-hooks tries to set the nisdomainname and also
properly configure some files for ntpd.
Although these are really small things, I think it is very important to
have these, or refined versions of these, in the distribution.
For without these, one has to do similar things for every m/c
installation, making the process more painful.
I think the dhcp client should do everything it can to safely configure
the host on booting to save admin. time and effort, and also to ensure
more consistent operation.
Thanks to Ted for pointing me to dhclient-exit-hooks.
Regards,
Chitta
-- Attached file included as plaintext by Ecartis --
-- File: dhclient-exit-hooks
#!/bin/sh
# File: /etc/dhclient-exit-hooks
# Author: Chittaranjan Mandal, Dept. of CSE, IITKGP
# Date: Jan 6, 2002
if [ "x$new_nis_domain" != x ] ; then
domainname $new_nis_domain
echo "dhclient-exit-hooks: set domainname to $new_nis_domain"
fi
if [ "x$new_ntp_servers" != x ] ; then
echo $new_ntp_servers > /etc/ntp/step-tickers
echo "dhclient-exit-hooks: dumped $new_ntp_servers to /etc/ntp/step-tickers"
fi
if [ -f /etc/ntp.conf ] ; then
sed "s/^[ ]*server.*//" /etc/ntp.conf > /tmp/ntp.conf
sed "s/^[ ]*fudge.*//" /tmp/ntp.conf > /tmp/ntp.conf.1
awk -v ntps="$new_ntp_servers" "
BEGIN { print \"server \"ntps ;
print \"server 127.127.1.0\";
print \"fudge 127.127.1.0 stratum 10\"
blank=0 ;
start=1 ;
}
/^[ ]*$/ { if (start==0 || blank==0 ) { print ; blank=1 } }
/[^ ][^ ]*/ { print ; start=0 }
" /tmp/ntp.conf.1 > /etc/ntp.conf
rm /tmp/ntp.conf
echo "dhclient-exit-hooks: replaced server with $new_ntp_servers in /etc/ntp.conf"
fi
-- Attached file included as plaintext by Ecartis --
-- File: dhclient.conf
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name, nis-domain,
nis-servers, ntp-servers, lpr-servers;
-----------------------------------------------------------------------
To unsubscribe from this list, visit http://www.isc.org/dhcp-lists.html
or send mail to dhcp-client-request@isc.org with the subject line of
'unsubscribe'.
-----------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic