khanhvo7
asked on
Add peristent routes that will still retain after reboot
Been trying to figure out a way of adding persistent routes to a new SCO Openserver 6 server. I've been adding it with the "route add -net 1.1.1.0 1.1.1.254", but the routes don't retain after a reboot. Any help on this matter would be appreciated.
I would do this approach if I am on my linux box.
1) Create a file e.g "startup" in /etc/init.d/ [chmod that file "startup" must be an executable]
#!/bin/bash
/sbin/route add -net 1.1.1.0 1.1.1.254
2) run "update-rc.d startup defaults"
3) Reboot your box
1) Create a file e.g "startup" in /etc/init.d/ [chmod that file "startup" must be an executable]
#!/bin/bash
/sbin/route add -net 1.1.1.0 1.1.1.254
2) run "update-rc.d startup defaults"
3) Reboot your box
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Let me rehash what you just told me.
1. Create a file named "startup" in /etc/init.d/
2. chmod the file
3. Add the route statements in the file
4. Run "update-rc.d startup defaults"
5. Reboot the box
As mentioned, I just started learning SCO so even commands such as chmod are new to me. If I asked redundant questions it's only to make sure I am doing the right things.
1. Create a file named "startup" in /etc/init.d/
2. chmod the file
3. Add the route statements in the file
4. Run "update-rc.d startup defaults"
5. Reboot the box
As mentioned, I just started learning SCO so even commands such as chmod are new to me. If I asked redundant questions it's only to make sure I am doing the right things.
ASKER
Question for Mikelfritz:
This is what I've done.
1. Navigated to /etc/rc2.d/
2. vi S99addroute
3. added lines for multiple routes : /etc/route add -net 1.1.1.0 1.1.1.254
/etc/route add -net 1.1.2.0 1.1.1.254
4. chmod 744 S99addroute
5. saved file
Do I still need to do an update command of any sort or is that all I need? I've already added the routes manually so no point in rebooting it now.
This is what I've done.
1. Navigated to /etc/rc2.d/
2. vi S99addroute
3. added lines for multiple routes : /etc/route add -net 1.1.1.0 1.1.1.254
/etc/route add -net 1.1.2.0 1.1.1.254
4. chmod 744 S99addroute
5. saved file
Do I still need to do an update command of any sort or is that all I need? I've already added the routes manually so no point in rebooting it now.
ASKER
A few follow up questions for you.
That will work just fine.
They will be added automatically at the next boot.
They will be added automatically at the next boot.
Maybe you can tell me something. Is there even a /etc/init.d directory? 5.0.7 and older do not have it. I don't have version 6 and don't plan on getting it. I would just like to know for my own information.
ASKER
Yes there is, with these folder/files in them:
ANNOUNCE
CLEAN
HWDNLOAD
KERNINIT
MDAC
MOUNTFSYS
README
RECOVERY
RESERVED
RMTMPFILES
SYSINIT
USRDAEMON
USRDEFINE
audit
cron
cups
emu
ipfnat
kdc
lp
mse
mstppp
mysql
nfs
nmb
perf
pgsql
rpc
sendmail
smb
squid
sync
sysetup
tomcat
uucp
vxvm-mirstand
vxvm-reconfig
vxvm-recover
vxvm-startup
vxvm-sysboot
webmin
winbind
ANNOUNCE
CLEAN
HWDNLOAD
KERNINIT
MDAC
MOUNTFSYS
README
RECOVERY
RESERVED
RMTMPFILES
SYSINIT
USRDAEMON
USRDEFINE
audit
cron
cups
emu
ipfnat
kdc
lp
mse
mstppp
mysql
nfs
nmb
perf
pgsql
rpc
sendmail
smb
squid
sync
sysetup
tomcat
uucp
vxvm-mirstand
vxvm-reconfig
vxvm-recover
vxvm-startup
vxvm-sysboot
webmin
winbind
Then ofkr's approach would be fine too. The /etc/rc2.d/SXXXXX method has been what's used for at least 5.0.7 and below. Thanks for the info.
ASKER