Operating System - HP-UX
1823910 Members
3426 Online
109666 Solutions
New Discussion юеВ

HP-UX version of 'chkconfig'

 
Robin Abecasis
Advisor

HP-UX version of 'chkconfig'

Hey guys, just wondering if anyone has written, or come across a port of the RedHat/SuSE utility 'chkconfig' that works on HP-UX?

Cheers in advance,
Robin
Wots going on 'ere then?
5 REPLIES 5
Hakan Aribas
Valued Contributor

Re: HP-UX version of 'chkconfig'

In RedHat, chkconfig command can add an init script into all of the rc.x directories needed for it to start and stop at the appropriate runlevels and it can also manage what runlevels something can run or stop in, and also deactivate something completely.

I am not exactly sure, but there is no such a command in HP-UX, and I haven't heard about a port of this usefull command.. :-(
Rick Garland
Honored Contributor

Re: HP-UX version of 'chkconfig'

HPUX does not have a similar utility.
You would need to create your own init scripts.
Can start with a copy of 1 of the init scripts and then make the necessary changes. Then make the additions a nd links as required
Sudeesh
Respected Contributor

Re: HP-UX version of 'chkconfig'

You can use /sbin/init.d/template file to create your own init scripts.


Sudeesh
The most predictable thing in life is its unpredictability
Robin Abecasis
Advisor

Re: HP-UX version of 'chkconfig'

Thanks for the replies guys, i'm more interested in the 'chkconfig' output, but of course it would be nice to have a full port of the good utility!

Cheers,
Robin
Wots going on 'ere then?
Bill Thorsteinson
Honored Contributor

Re: HP-UX version of 'chkconfig'

Red hat and HP-UX have significantly different
approaches to the rc?.d configuration.

HP-UX uses two links, one for startup and one
for shutdown. This is because scripts at all run levels up (or down) to the desired level
are run in sequence.

RedHat (Linux) runs the scripts for the
the desired level only requiring many more
links and hence the creation of chkconfig.

For HP-UX it should be trivial to write a
chkconfig script.
- Grep out the config line.
- parse the config line.
- unlink the scrip in all rc?.d directories
- link the start script.
- calculate the kill link rc = (rc - 1),
sequence = (1000 - sequence )
- link the kill script.