Changing IP address with set_params

I want to change the IP address of my computer (743i card using HP-UX 10.2) using "set_params ip_address". The problem is the following:

  1. I'm using a touch panel to enter in the IP address.

  2. The set_params routine asks two questions; do I want to use the IP address entered and do I want to reboot.

Is there a way to pass the IP address (entered in with the touch panel) to the set_params routine and have it modify the IP address and reboot without asking for permission to do so?

You would have to modify the set_parms script to be able to do this.

All this script does is modify the /etc/rc.config.d/netconf and /etc/hosts files. It might be easier to do this directly using the input from the touch screen. You could then run

/sbin/init.d/net stop ; /sbin/init.d/net start

to make the changes take effect immediately without rebooting.

So it's not necessary to reboot the system after I modify the above files with the new IP address?

Not unless you are running Windows! :wink:

Seriously though, modern Unix systems can make many configuration changes without requiring a reboot. This is one good example. The "net stop" command I gave you will halt the networking, and the "net start" will restart it. So your downtime will be a few seconds while you type these commands, instead of waiting to reboot which can take forever on an HP-UX box :frowning: