Operating System - HP-UX
1752620 Members
4445 Online
108788 Solutions
New Discussion юеВ

Re: Pls verify my uderstanding about "starting the services automatically"

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Pls verify my uderstanding about "starting the services automatically"

Hi All,

I am new to hpux.

I have understood some thing about "starting the services automatically".

For a say, we want to run samba (cifs) service automatically.

Default runlevel - 3

1)During booting, /sbin/rc will call all the files starting with S in all runlevels directories (rc1.d, rc2.d, rc3.d, rc4.d)

2)So it will call the file "S900samba" available in /sbin/rc2.d.

3)Then system will check "/etc/rc.config.d/samba" for the entry "RUN_SAMBA=1".

if that is available then it will start the samba.

if that is "RUN_SAMBA=0" then it will not start the samba.


Is it correct?


11 REPLIES 11
James R. Ferguson
Acclaimed Contributor
Solution

Re: Pls verify my uderstanding about "starting the services automatically"

Hi Senthil:

You are correct.

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

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

1) Correct
2) Correct
3) Correct

Actually rc may check RUN_SAMBA first, but you've essentially got it right and the actual sequence can be checked in the rc man page.


Pete

Pete
Mark S Meadows
Valued Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

Hi Senthil,

Your understanding above is correct.

For confirmation do a "man rc" or refer to the following link, which is still relevant even though it relates to HP-UX 10.x :

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

Regards,

Mark
Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).
Pete Randall
Outstanding Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

On second thought, it's the S900samba script that sources /etc/rc.config.d/samba to check they value of RUN_SAMBA, so you're correct on all counts.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

Shalom,

Your understanding is correct.

The soft link S900samba should link to the /sbin/init.d/ script that starts samba.

Everything else is on the nose.

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
Sunny123_1
Esteemed Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

Hi Senthil

Yes you are right

Regards
Sunny
senthil_kumar_1
Super Advisor

Re: Pls verify my uderstanding about "starting the services automatically"

So all the service have a configuraion file in "/etc/rc.config.d".

1)In that files we have to mention the details about auto starting?

2)Have all the file available in runlevel directories been created automatically during installing the HPUX?.

3)If we need some startup scripts, then we can include them in the runlevel folder?

Am i correct?
Steven E. Protter
Exalted Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

Shalom again,

So all the service have a configuraion file in "/etc/rc.config.d".


1)In that files we have to mention the details about auto starting?

Yes there is written documentation int he /etc/rc.config.d files. As far as I know this structure is unique to HP-UX though I've implemented on Linux and am sure it is still driving my last supervisor up a wall.

2)Have all the file available in runlevel directories been created automatically during installing the HPUX?.

The directories are created automatically.
The soft links are sometimes created automatically (ex sshd) sometimes you need to do it yourself.


3)If we need some startup scripts, then we can include them in the runlevel folder?

No.

Startup scripts go in /sbin/init.d

The /sbin/rc.X.d directories include soft links to the scripts in /sbin/init.d


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
Sunny123_1
Esteemed Contributor

Re: Pls verify my uderstanding about "starting the services automatically"

Hi Senthil

For first teo you are correct.And if you want to put start up script manually in rc.xx then you first need to crate in /sbin/init.d and then crate soft linjk in rc.xx directory.

Regards
Sunny