RE: Scripts for /etc/init.d or /etc/rc.d
"Shprentz, Joel [C] " <[email protected]> Thu, 5 Jun 2003 17:51:56 -0400
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <068CC65B1509FA4D89CB2E7509C5E7B99A2096@CLUWSH04.gold.rtgold.nima.mil> |
Will suggests a chkconfig-fragment to control the deployment of startup scripts in /etc/init.d, /etc/rc1.d, etc. > <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> Jonathan suggests storing the preparation, start, and stop code in package methods so the code can be executed under ark's control: > <prepare> > <code once-per="hosts-supported" recordable="no"> > ... > </code> > </prepare> > > <start> > <constraints> > <dependency type="essential" name="." > on-method="prepare"/> > </constraints> > <code once-per="hosts-supported" recordable="no"> > ... > </code> > </start> > > <stop> > <constraints> > <dependency type="essential" name="." > on-method="prepare"/> > </constraints> > <code once-per="hosts-supported" recordable="no"> > ... > </code> > </stop> (Jonathan also suggests how to achieve this with proto-packages.) > You'd want to hide this sort of madness in a proto-package and > use Will's usual trick of adding '-bits' methods that you then > override in the actual packages ... These two approaches could be combined. There is enough information here for ark to assemble, install, and link startup scripts in /etc/init.d and friends. These standalone scripts can be interspersed with OS-supplied scripts and can run before an ark-capable environment is available. The <start> and <stop> methods still can be run by ark. Other packages' methods can refer to them in constraints or invoke them from method code. ------------------------------------------------------- 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.