obtain bad address bge0

Hi

i was changing the ip address, gateway and dns of a sun solaris 9 machine. i have edited the files hosts, resolv and defaultrouter elsewhere. however, i forgot to copy the edited hosts file over and reboot the system. i thus obtained bad address bge0 and when ifconfig -a , it shows inet 0.0.0.0. have used terminal to get in and managed to use vi to create a file and mv to replace the hosts file. (hosts file is read only under vi). after reboot, inet still is 0.0.0.0. Have then use ifconfig command to change it and it manages to change to the required ip address. But the problem lies here, after reboot, the inet jumps back to 0.0.0.0 although the hosts file is correct now..

any one knows a solution to this? please..

thanks

[761 byte] By [implife] at [2007-11-26 7:54:15]
# 1
You also needed to edit /etc/hostname.bg0 in order to set an hostname. Also; just because a file is marked 'readonly' in vi doesn't mean you can't edit it. If you have the proper permissions (root) you can force vi to save your changes regardless of the lacking w permission flag using
LionO at 2007-7-6 20:17:00 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
i am using terminal to get into the server. when i try to use vi, the cursor only stays at the bottom. will try waht you mentioned.. thanks..
implife at 2007-7-6 20:17:00 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...