Operating System - HP-UX
1758874 Members
2762 Online
108876 Solutions
New Discussion юеВ

Automatically run script at boot up

 
SOLVED
Go to solution
Donald Lalonde
Advisor

Automatically run script at boot up

Hi guys,

I am running HP-UX 11i on an RP5470.

I have a script which starts up my Oracle database. Is there a way to tell HPUX to run this script every time the system boots up?
Do I need to place the script somewhere or make a change in a config file (in rc.config.d)?

Thanks
7 REPLIES 7
Slawomir Gora
Honored Contributor
Solution

Re: Automatically run script at boot up

Hi,

you have to copy you startup script to /sbin/init.d/ directory
and make software links:

(in this example my script name is dbora)

To start:
ln -s /sbin/init.d/dbora /sbin/rc2.d/S999dbora
To stop:
ln -s /sbin/init.d/dbora /sbin/rc1.d/K108dbora
RAC_1
Honored Contributor

Re: Automatically run script at boot up

Depending on which run level you want to start you oracle database, you need to prepare a script and put in /sbin/init.d/.
Then appropriate start and kill scripts in /sbin/rcx.d/

You can refer /sbin/init.d/template script to start with.

Also if you search the forums, you may get one readymade.

Anil
There is no substitute to HARDWORK
Slawomir Gora
Honored Contributor

Re: Automatically run script at boot up

Hi,

of course script have to have start/stop/ sections look at my script.
Pete Randall
Outstanding Contributor

Re: Automatically run script at boot up

This is described in the man page for rc: "man rc".



Pete

Pete
Devender Khatana
Honored Contributor

Re: Automatically run script at boot up

Hi,

Apart from all this you can use /sbin/init.d/template file having copied to the required name.Also your links starting with S and K in /sbin/rc?.d has to have a unique no. Also this no. should be towards the end for S as startup of oracle depends on many services those should be started before these, and had to be in the starting itself for K as it should be shutdown before other services on which it depends.

Exact no. you can choose having a look at nos. in these directories of your system.

HTH,
Devender
Impossible itself mentions "I m possible"
Geoff Wild
Honored Contributor

Re: Automatically run script at boot up

And this doc:

http://docs.hp.com/en/5990-8172/ch05s03.html

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Donald Lalonde
Advisor

Re: Automatically run script at boot up

Thanks for the info.