System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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
TTr
Honored Contributor

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

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

Correct for the cifs services and many other ones. But some startup scripts specially from add-on software do not follow exactly that pattern. They either don't have a file in /etc/rc.config.d or the /sbin/init.d/
During the HP-UX install, the OS comes with all the startup scripts. Some add-on software need special treatment. Some provide start up scripts that follow the HP-UX standars some don't. You have to verify the start up process for all add-on software that you install. Some sw don't provide startup scripts and you have to write them.
James R. Ferguson
Acclaimed Contributor

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

Senthil:

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

Usually.

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

I don't understand what you are asking here.

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

Yes, the ones for HP-supplied subsystems.

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

The word is "directory" in Unix, not "folder". READ THE MANUAL I cited and/or the manpages for 'rc(1M) as mentioned by Pete. All of your questions are answered therein.

Regards!

...JRF...