Operating System - HP-UX
1846602 Members
1666 Online
110256 Solutions
New Discussion

Re: start up script help ..

 
someone_4
Honored Contributor

start up script help ..

Hey everyone,
I have this route add script here that adds routes on start up.The problem is that the
/etc/rc.config.d/static_route
part only holds one route. If I add more then one to the config file it does not add them. I have tried with the []forat
STATIC_ROUTE_DESTINATION[1]
STATIC_ROUTE_DESTINATION[2]
But no luck. Any ideas?

Thanks
Richard

7 REPLIES 7
Joseph C. Denman
Honored Contributor

Re: start up script help ..

Richard,

Have you tried adding the routes to the route section of the netconf file?

...jcd...
If I had only read the instructions first??
Helen French
Honored Contributor

Re: start up script help ..

Hi Richard,

You can try adding the routes to the /etc/rc.config.d/netconf file. For a complete instruction and syntax, check this out:

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=0a3c99a11344f9a0ef/screen=ckiDisplayDocument?docId=200000053723989

HTH,
Shiju

Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor

Re: start up script help ..

Hi Richard:

If you are looking for the proper syntax, consider this:

#!/usr/bin/sh
ARY[0]=hello
ARY[1]=richard
echo "${ARY[0]} there ${ARY[1]}"
ARY[0]=date
ARY[1]=hostname
eval ${ARY[0]}
eval ${ARY[1]}

Does this help?

Regards!

...JRF...
Paula J Frazer-Campbell
Honored Contributor

Re: start up script help ..

Hi Richard

Route that you want to be available at boot time should be added in netconf

/etc/rc.config.d/netconf.

Example :-

#
ROUTE_DESTINATION[2]="net 10.8.48.0" # Destination
ROUTE_MASK[2]=255.255.254.0
ROUTE_GATEWAY[2]="192.1.0.239"
ROUTE_COUNT[2]="1"
ROUTE_ARGS[2]=""
#
ROUTE_DESTINATION[3]="net 192.1.4.0" # Destination
ROUTE_MASK[3]=255.255.255.0
ROUTE_GATEWAY[3]="192.1.0.250"
ROUTE_COUNT[3]="1"
ROUTE_ARGS[3]=""

Note that they increment up by one for each route. This file is read at boot time and so to add a route on the live server :-

route add - see man route.
And also add it to the netconf file if you want it available after a reboot.

HTH

Paula
If you can spell SysAdmin then you is one - anon
someone_4
Honored Contributor

Re: start up script help ..

Ok ...
I have added to the routes to the netconf file. Now tell me if I am wrong. But the reason I am going this route is because I was told that there are limitations on how many static routes you can add in the netconf file.

Richard
harry d brown jr
Honored Contributor

Re: start up script help ..

Richard, I remember the same thing, but I haven't been able to find the damn resource thta stated the limits. I seem to remember something like 15 or 16. If I find it, I'll post again.

live free or die
harry
Live Free or Die
Darrell Allen
Honored Contributor

Re: start up script help ..

Hi Richard,

I don't know about the limit on the number of routes that can be placed in netconf. I do know that it can be helpful to have a script to set your routes. It becomes rather simple to run the script manually should your routing table be zapped or some routes dropped.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)