* DHCP/Clock Related Question
@ 1999-04-12 22:21 Sharma, Tushar
0 siblings, 0 replies; only message in thread
From: Sharma, Tushar @ 1999-04-12 22:21 UTC (permalink / raw)
To: tru64-unix-managers
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="------_=_NextPart_001_01BE8532.C4453E66", Size: 9266 bytes --]
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BE8532.C4453E66
Content-Type: text/plain;
charset="iso-8859-1"
Hi Y'all,
Hardware - DEC 2000 Model 300 aka DECpc 150 AXP - DHCP Client DU 4.0E (I
still have one of these...)
CISCO 776 ISDN Router - DHCP server
Two questions.
1. In /sbin/init.d/inet there is a comment for a 'DYNAMIC' interface (aka
DHCP Client) which reads as
# TODO: add this name/address to /etc/hosts
# if we have a hostname to go with it.
If this is not done, CDE breaks because it needs a hostname in /etc/hosts
for the current IP address of 'ln0'.
Are there any plans to fix inet or is there a patch?
I have the following home-grown set of commands which are crude but
effective.
#
# The line containing the localipaddr as determined
# by the previous call to dhcpparm is deleted
# irrespective of ANY other user-entered information
# related to this ip address, and, a new line is appended
# to the end of /etc/hosts with the correct information as
# returned by the various calls to dhcpparm. Also, entry(s) for
# any other ip addresse(s) related to this host from previous
incarnations
# of DHCP calls are deleted.
#
current_hostname=`/sbin/hostname`
current_dn=`/usr/sbin/dhcpparm -i $devval dn`
cp -p /etc/hosts /etc/hosts.old # Just in case
#
# Remove entries with the current ip address from /etc/hosts
#
echo "Removing entries for ${localipaddr} from /etc/hosts..."
echo "/${localipaddr}/ d" >/tmp/sed.tmp
sed -f/tmp/sed.tmp </etc/hosts >/etc/hosts.tmp_1
rm /tmp/sed.tmp
#
# Remove entries with the current fully-qualified host name
# from /etc/hosts
#
echo "Removing entries for ${current_hostname}.${current_dn} from
/etc/hosts..."
echo "/${current_hostname}.${current_dn}/ d" >/tmp/sed.tmp
sed -f/tmp/sed.tmp <etc/hosts.tmp_1 >/etc/hosts.tmp_2
echo "${localipaddr} ${current_hostname}.${current_dn}
${current_hostname} #Added by DHCP" >>/etc/hosts.tmp_2
mv /etc/hosts.tmp_2 /etc/hosts
echo "Added following entry to /etc/hosts:"
echo "${localipaddr} ${current_hostname}.${current_dn}
${current_hostname}"
echo ""
2. Setting the clock on the DU 4.0E side really messes up the ARC Console.
The date points to somewhere in 2028 and the ARC console will not let me
boot NT.
Any suggestions and/or advice welcome.
.Tushar.
------_=_NextPart_001_01BE8532.C4453E66
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>DHCP/Clock Related Question</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hi Y'all,</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hardware - DEC 2000 Model 300 aka =
DECpc 150 AXP - DHCP Client DU 4.0E (I still have one of =
these...)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; CISCO 776 ISDN Router - DHCP =
server</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Two questions.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">1. In /sbin/init.d/inet there is a =
comment for a 'DYNAMIC' interface (aka DHCP Client) which reads as =
</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial"> </FONT> =
<FONT =
SIZE=3D2 FACE=3D"Courier New"># TODO: add this name/address to =
/etc/hosts</FONT>
<BR> =
<FONT SIZE=3D2 =
FACE=3D"Courier New"># if we have a hostname to go with it.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier New"> If this is not done, CDE =
breaks because it needs a hostname in /etc/hosts</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New"> for the current IP =
address of 'ln0'.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier New"> Are there any plans to =
fix inet or is there a patch? </FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier New"> I have the following =
home-grown set of commands which are crude but effective.</FONT>
</P>
<P> <FONT SIZE=3D2 =
FACE=3D"Courier New">#</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># The line containing the localipaddr as =
determined</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># by the previous call to dhcpparm is =
deleted</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># irrespective of ANY other user-entered =
information</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># related to this ip address, and, a new line is =
appended</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># to the end of /etc/hosts with the correct =
information as</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># returned by the various calls to dhcpparm. Also, =
entry(s) for </FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># any other ip addresse(s) related to this host =
from previous incarnations</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># of DHCP calls are deleted. </FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">#</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">current_hostname=3D`/sbin/hostname`</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">current_dn=3D`/usr/sbin/dhcpparm -i $devval =
dn`</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">cp -p /etc/hosts /etc/hosts.old # Just in =
case</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">#</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># Remove entries with the current ip address from =
/etc/hosts</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">#</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "Removing entries for ${localipaddr} =
from /etc/hosts..."</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "/${localipaddr}/ d" =
>/tmp/sed.tmp</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">sed -f/tmp/sed.tmp </etc/hosts =
>/etc/hosts.tmp_1</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">rm /tmp/sed.tmp</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">#</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># Remove entries with the current fully-qualified =
host name</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New"># from /etc/hosts</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">#</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "Removing entries for =
${current_hostname}.${current_dn} from /etc/hosts..."</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "/${current_hostname}.${current_dn}/ =
d" >/tmp/sed.tmp</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">sed -f/tmp/sed.tmp <etc/hosts.tmp_1 =
>/etc/hosts.tmp_2</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "${localipaddr} =
${current_hostname}.${current_dn} =
${current_hostname} #Added by DHCP" =
>>/etc/hosts.tmp_2</FONT></P>
<P> <FONT SIZE=3D2 =
FACE=3D"Courier New">mv /etc/hosts.tmp_2 /etc/hosts</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "Added following entry to =
/etc/hosts:"</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo "${localipaddr} =
${current_hostname}.${current_dn} ${current_hostname}"</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Courier New">echo ""</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">2. Setting the clock on the DU 4.0E =
side really messes up the ARC Console. The date points to somewhere in =
2028 and the ARC console will not let me boot NT. </FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Any suggestions and/or advice =
welcome.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">.Tushar.</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01BE8532.C4453E66--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-04-12 22:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-12 22:21 DHCP/Clock Related Question Sharma, Tushar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox