SYNOPSIS

       need [-r] service
       display-services
       provide service


OVERVIEW

       The initctl programme is designed to help improve the robustness, scal-
       ability and readability of system boot scripts. It is now  possible  to
       write a modularised set of boot scripts without the complex and fragile
       numbered symlink scheme used in SysV-style boot  scripts.  Each  script
       can simply declare, using need(8), what must run before them.


DESCRIPTION for need

       The  need  programme  is  a utility that tells simpleinit(8) to start a
       service (usually a script in /sbin/init.d) and will wait for  the  ser-
       vice  to become available. If the service is already available, it will
       not be started again.

       The -r option is used to tell simpleinit(8) to "roll back" (stop)  ser-
       vices  up  to (but not including) service. If service is not specified,
       all services are stopped. The -r option thus allows the  system  to  be
       partially  or  wholly  shut down in an orderly fashion. The shutdown(8)
       programme still needs to be run.



DESCRIPTION for display-services

       When invoked as display-services it will write the  list  of  currently
       available services and the list of failed services to the standard out-
       put.



DESCRIPTION for provide

       When invoked as provide it tells simpleinit(8) that the  parent  (call-
       ing)  process  will  be  providing  a service with name service. If the
       calling process exits successfully (status 0) the service is deemed  to
       be available. Only one instance of service may be started, so alternate
       providers will block and may fail.

       Using provide it is possible to have multiple potential  providers  for
       the  same (generic) service (e.g. sendmail and qmail both provide a mta
       service), where only one actually provides the  service.  This  may  be
       used by service startup scripts which check for configuration files.


EXIT CODE

       The exit code from need is 0 if the service was successfully started, 1
       if the service failed badly, and 2 if the service is unavailable  (i.e.
       disabled  in  configuration  files).  These exit codes reflect the exit
       codes from the service startup scripts.

       The exit code from need  -r  is  0  if  the  service  was  successfully
       stopped,  1  if  the service could not be stopped, and 2 if the service
       was not available to start with. The service shutdown scripts may  only
       simpleinit(8), init(8)
       A  more  complete  discussion  of  the new boot script system, based on
       need(8),               is                available                from:
       http://www.atnf.csiro.au/~rgooch/linux/boot-scripts/

AUTHOR

       Richard Gooch (rgooch@atnf.csiro.au)

AVAILABILITY

       The   Util-Linux   package   is   available   from:   ftp://ftp.??.ker-
       nel.org/pub/linux/utils/util-linux/



Util-Linux Package                21 Feb 2001                       INITCTL(8)

Man(1) output converted with man2html