1834342 Members
2186 Online
110066 Solutions
New Discussion

Run Control Script

 
SOLVED
Go to solution
susee_sundar
Regular Advisor

Run Control Script

I want to run the following script while system Booting & need to Halt at runlevel 2..

THE SCRIPT /data/BACKUP

I WANT TO START IN RUNLEVEL 3 & KILL AT LEVEL 2.
PlS PROVIDE ME THE SCRIPT FILE THAT WILL DO THIS ...

The script that needs to pasted to init.d directory....
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Run Control Script

Shalom,

/sbin/init.d/BACKUP

It must be a script based on /sbin/init.d/template that accepts start and stop commands. If not, you need a new script.

Lets say it complies

cd /sbin/rc3.d
ln -s /sbin/init.d/BACKUP S900backup

cd /sbin/rc2.d
ln -s /sbin/init.d/BACKUP K100backup


If the script itself is right everything else will work.

If this backup is big it will significantly slow down your system start and stop process.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
susee_sundar
Regular Advisor

Re: Run Control Script

Thats the Problem...I dont know how to make a template script..


Can anybody able to Provide me the same for the script Backup
Pete Randall
Outstanding Contributor
Solution

Re: Run Control Script

The /sbin/init.d/template script already exists. It is an example of how a start/stop script should be. Copy it and edit it to suit your needs.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Run Control Script

Hi:

You can obtain a complete understanding of the startup requirements by examining the manpages for 'rc(1m)' and/or the document below:

http://docs.hp.com/en/B2355-60127/rc.1M.html

http://docs.hp.com/en/934/startup.pdf

As already noted, you should model your script after '/sbin/init.d/template'.

Regards!

...JRF...
susee_sundar
Regular Advisor

Re: Run Control Script

Thanks to all...