RE: Scripts for /etc/init.d or /etc/rc.d

"Shprentz, Joel [C] " <[email protected]> Thu, 5 Jun 2003 16:38:33 -0400
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <068CC65B1509FA4D89CB2E7509C5E7B99A2095@CLUWSH04.gold.rtgold.nima.mil>
Will Partain wrote: 
> I *think* I might go another way... namely to have the ARK
> machinery manipulate /etc/{init.d,rc?.d} (or whatever)
> directly.  Perhaps ...
> https://lists.sourceforge.net/lists/listinfo/ark-dev

Yes, I want ark to install scripts in /etc/init.d and link them in
/etc/rc1.d, etc.

A newly discovered reason for favoring this approach is that some
ark-installed scripts should run be ark could possibly run.  For example, I
want to run the LDAP client startup script before the Solaris-supplied NFS
automounter script.  With many ark resources automounted, there is no way to
fire up ark first to start that LDAP client.

I had considered running Bo Adler's version of chkconfig to manage the
startup scripts and links (under ark control, of course).  His source code
is available from
http://www.fastcoder.net/~thumper/software/sysadmin/chkconfig/.
Unfortunately, chkconfig failed to compile with gcc--3.2.2 under Solaris 8;
a macro-enabled error message asks for either the Redhat popt or GNU getopt
library.  I haven't pursued those libraries.

>   Or better, it would simply supply a <chkconfig-fragment>,
>   maybe 
> 
>   <chkconfig-fragment><table>
>     <entry name="service">samba</entry>
>     <entry name="spec">234 21 82</entry>
>     <entry name="description">Provide file service to Windows
hosts.</entry>
>   </table></chkconfig-fragment>
> 
>   and then some "super-chkconfig" script would slurp these
>   in and make everything behave.

Should the "spec" entry follow the chkconfig program format as in your
example?  Or should the three parameters (run levels, start order, and stop
order) be individual entries?

I think that individual entries would be more ark-like.  Team owned packages
could override prototype entries.  Ark code could refer to the values by
name.  The spec entry could be constructed using ark macros.



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.