Operating System - HP-UX
1822320 Members
6144 Online
109642 Solutions
New Discussion юеВ

Re: Adding persistant route to multiple servers

 
wurzul
Frequent Advisor

Adding persistant route to multiple servers

HP-UX 11.23

I have a ksh script that is to be run across multiple servers. I need to add a persistant route to the servers in runs on. I know I can use the 'route add' command quite easily to add a new route from within the script but how can I make this route permanent across reboots using the same method? Is there any way that avoids complex editing of the netconf file or is this the only way?

Thanks in advance
2 REPLIES 2
Rasheed Tamton
Honored Contributor

Re: Adding persistant route to multiple servers

Hi,

With scripting you can do it. But I do not think it is recommended. If something goes worng, then you will lost the remote connectivity of the system invovled. Otherwise, you must have GSP remote access to connect to those systems, if something goes unexpected way.

You could use sed to replace online the file /etc/rc.config.d/netconf. But the MAIN issue will be the lancard instance no. In some cases, it will be [0] or [1], etc.

Regards.
Rasheed Tamton
Honored Contributor

Re: Adding persistant route to multiple servers

If the current gateway address and the new address are same for all the servers, you can do something like this:

sed 's/10.33.27.126/10.33.33.222/g' netconf > newnetcof; mv newnetcof netconf

10.33.27.126 current
10.33.33.222 new

You have to make a backup copy of the netconf file before that.

Rgds.