Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Phantom DNS entry on UnixWare 7.1.1

Status
Not open for further replies.

necsi

IS-IT--Management
Dec 6, 2000
13
US
I have recently installed UnixWare 7.1.1 on an HP server.
The install went very well. We assigned an IP address and at the conclusion of the install decided to change the IP address. The system now keeps refering to a DNS entry which contains the old IP address.
This is causing problems when booting the machine. If the NIC card is removed, all is fine. Re-insert the card and there are problems. The old IP was 192.168.1.1
I'm ready to put this machine into production once this issue is resolved.
Thanks.
 
Hi i guess this can help.

Please feel free to let me know how this gone at champetu@gmx.net

Create a file with the following text and that will help
you.


#!/bin/sh
# script to name and ip of a UW7 system

echo " Type actual Name for host"
read oldname
echo " Type new name for host"
read newname
echo " type actual Ip"
read oldip
echo " type new ip"
read newip

echo "
The name $oldname will change for $newname
The IP $oldip will change for $newip

Is correct ?"
read yn

#####################
# change system name form $oldname to $newname

/sbin/setuname -n $newname

for file in /etc/inet/hosts /etc/net/ticlts/hosts /etc/net/ticots/hosts /etc/net/ticotsord/hosts /etc/netware/.olduname /etc/netware/nwconfig /etc/nodename /usr/ns-home/admserv/httpd-80/magnus.conf /usr/ns-home/admserv/ns-admin.conf /usr/ns-home/cgi-bin/counters/conf/count.cfg /usr/ns-home/docs/include/hostname.inc /usr/ns-home/docs/include/nodename.inc /usr/ns-home/docs/include/scohelp.inc /usr/ns-home/docs/include/ttalogin.inc /usr/ns-home/httpd-80/config/magnus.conf /usr/ns-home/httpd-scohelphttp/config/magnus.conf /usr/vision/vfsprofile/current.prf /usr/vision/vfsprofile/factory.prf /var/adm/isl/ifile /var/adm/lastlog

do
if cp $file $file\#
then
sed &quot;s/$oldname/$newname/g&quot; < $file\# > $file
fi
done

for dir in /var/spool/lp/requests/$oldname /var/spool/lp/tmp/.net/requests/$oldname /var/spool/lp/tmp/.net/tmp/$oldname /var/spool/lp/tmp/$oldname

do
mv $dir `echo $dir | sed &quot;s/$oldname/$newname/&quot;`
done

rm /var/spool/lp/temp
ln -s /var/spool/lp/tmp/$newname /var/spool/lp/temp

#####################################################
# change IP address from $oldip to $newip

for file in
/etc/confnet.d/inet/interface /etc/inet/config /etc/inet/hosts /etc/inet/nb.conf /usr/ns-home/admserv/ns-admin.conf /var/adm/isl/ifile

do
if cp $file $file\#
then
sed &quot;s/$oldip/$newip/g&quot; < $file\# > $file
fi
done

echo &quot; nuevo nombre $newname y nueva direccion $newip modoficados O.K.&quot;








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top