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.
Received on Mon Apr 12 1999 - 22:24:06 NZST