Operating System - HP-UX
1826446 Members
4192 Online
109692 Solutions
New Discussion

Re: Simple question about shutdown-scripts

 
SOLVED
Go to solution
Daniel Schneider_3
Frequent Advisor

Simple question about shutdown-scripts

Hi all,

I have a simple question about the shutdownscripts in /sbin/rc?.d:

I know, that startup scripts (S999*) will be executed in ascending order.
Now the question is: how is the sequence, when shutting down? Is it ascending, too (e.g. K100xx runs before K200xx), or is it inverse?

Thanks for all help
Best Regards
Daniel
5 REPLIES 5
Victor BERRIDGE
Honored Contributor
Solution

Re: Simple question about shutdown-scripts

Hi Daniel,
It is ascending order
k050 then K100...

All the best
Victor
Robert-Jan Goossens
Honored Contributor

Re: Simple question about shutdown-scripts

Hi Daniel,

I use KXXX + SXXX = 1000

example
/sbin/rc3.d/S900Oracle
/sbin/rc2.d/K100Oracle

Hope this helps,
Robert-Jan
Victor BERRIDGE
Honored Contributor

Re: Simple question about shutdown-scripts

I do like Robert: last to sstart first beeing killed...
I wanted to tell you that you can check the order by looking at /etc/rc.log.old, at the end when it shuts down...

All the best
Victor
Daniel Schneider_3
Frequent Advisor

Re: Simple question about shutdown-scripts

Thank you Guys for fast help.

Have a nice Day

Best regards
Daniel
Ralph Grothe
Honored Contributor

Re: Simple question about shutdown-scripts

The sequence usually follows from simple shell globbing (on most SYSV Unices).
In the case of HP-UX it seems that the collating of the ls command determines the order (ls obeys LC_COLLATE, or LANG)
Have a look at the script /sbin/rc
There's a simple ls command to gather Kill or Start scripts.
So order can be seen from e.g.

ls -1 /sbin/rc2.d/K*
Madness, thy name is system administration