]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/need.8
Imported from util-linux-2.10m tarball.
[thirdparty/util-linux.git] / login-utils / need.8
1 .\" Copyright (C) 2000 Richard Gooch
2 .\"
3 .\" This program is free software; you can redistribute it and/or modify
4 .\" it under the terms of the GNU General Public License as published by
5 .\" the Free Software Foundation; either version 2 of the License, or
6 .\" (at your option) any later version.
7 .\"
8 .\" This program is distributed in the hope that it will be useful,
9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 .\" GNU General Public License for more details.
12 .\"
13 .\" You should have received a copy of the GNU General Public License
14 .\" along with this program; if not, write to the Free Software
15 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 .\"
17 .\" Richard Gooch may be reached by email at rgooch@atnf.csiro.au
18 .\" The postal address is:
19 .\" Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
20 .\"
21 .\" need.8 Richard Gooch 28-FEB-2000
22 .\"
23 .TH NEED 8 "28 Feb 2000" "Util-Linux Package"
24 .SH NAME
25 need \- utility to tell simpleinit(8) to start a service
26 .SH SYNOPSIS
27 .nf
28 \fBneed\fP [\fB-r\fP] [\fBservice\fP]
29 .BR display-services
30 .fi
31 .SH DESCRIPTION
32 The \fBneed\fP programme is a utility that tells \fBsimpleinit\fP(8)
33 to start a \fIservice\fP (usually a script in \fI/sbin/init.d\fP) and
34 will wait for the service to become available. If the service is
35 already available, it will not be started again.
36
37 When invoked as \fBdisplay-services\fP it will write the list of
38 currently available services and the list of failed services to the
39 standard output.
40
41 The \fB-r\fP option is used to tell \fBsimpleinit\fP(8) to "roll back"
42 (stop) services up to (but not including) \fIservice\fP. If
43 \fIservice\fP is not specified, all services are stopped. The \fB-r\fP
44 option thus allows the system to be partially or wholly shut down in
45 an orderly fashion. The \fBshutdown\fP(8) programme still needs to be
46 run.
47
48 The \fBneed\fP programme is designed to help improve the robustness,
49 scalability and readability of system boot scripts. It is now possible
50 to write a modularised set of boot scripts without the complex and
51 fragile numbered symlink scheme used in SysV-style boot scripts. Each
52 script can simply declare, using \fBneed\fP(8), what must run before
53 them.
54 .SH EXIT CODE
55 The exit code from \fBneed\fP is 0 if the service was successfully
56 started, 1 if the service failed badly, and 2 if the service is
57 unavailable (i.e. disabled in configuration files). These exit codes
58 reflect the exit codes from the service startup scripts.
59
60 The exit code from \fBneed -r\fP is 0 if the service was successfully
61 stopped, 1 if the service could not be stopped, and 2 if the service
62 was not available to start with. The service shutdown scripts may only
63 return 0 (for success) or 1 (for failure).
64 .SH SIGNALS
65 \fBneed\fP(8) uses \fBSIGUSR1\fP, \fBSIGUSR2\fP and \fBSIGPOLL\fP for
66 communication with \fBsimpleinit\fP(8). Don't send these signals to
67 it.
68 .SH FILES
69 .PD 0
70 .TP 20
71 .BI /dev/initctl
72 This is the control FIFO, created by \fBsimpleinit\fP(8), which
73 \fBneed\fP(8) writes commands to.
74 .SH SEE ALSO
75 .BR simpleinit (8),
76 .BR init (8)
77 .PP
78 A more complete discussion of the new boot script system, based on
79 \fBneed\fP(8), is available from:
80 http://www.atnf.csiro.au/~rgooch/linux/boot-scripts/
81 .SH AUTHOR
82 Richard Gooch (rgooch@atnf.csiro.au)
83 .SH AVAILABILITY
84 The Util-Linux package is available from:
85 ftp://ftp.??.kernel.org/pub/linux/utils/util-linux/