Next: Notification, Previous: Preprocessor, Up: Pies Configuration File [Contents][Index]
component StatementThe component statement defines a new component:
component tag {
…
}
The component is identified by its tag, which is given as
argument to the component keyword. Component declarations with
the same tags are merged into a single declaration.
The following are the basic statements which are allowed within the
component block:
Declare the type (style) of the component. Following are the basic values for mode:
execrespawnDefine a ‘respawn’ component (see respawn). This is the default.
inetdnostartacceptDefine an ‘inetd-style’ component (see inetd-style).
passpass-fdDefine a ‘meta1-style’ component (see meta1-style).
acceptDefine a ‘accept-style’ component (see accept-style).
startupThe component is run right after startup. Prior to starting any
other components, pies will wait for all startup
components to terminate.
shutdownThese components are started as a part of program shutdown sequence, after all regular components have terminated. See shutdown sequence, for a detailed discussion.
When run as init process (see Init – parent of all processes), the following modes are also allowed:
bootThe process will be executed during system boot. The ‘runlevel’ settings are ignored.
bootwaitThe process will be executed during system boot. No other components will be started until it has terminated. The ‘runlevel’ settings are ignored.
ctrlaltdelThe process will be executed when pies receives the SIGINT
signal. Normally this means that the CTRL-ALT-DEL combination has
been pressed on the keyboard.
kbrequestThe process will be executed when a signal from the keyboard handler is received that indicates that a special key combination was pressed on the console keyboard.
onceThe process will be executed once when the specified runlevel is entered.
ondemandThe process will be executed when the specified ondemand
runlevel is called (‘a’, ‘b’ and ‘c’). No real
runlevel change will occur (see Ondemand runlevels).
The process will remain running across any eventual runlevel changes
and will be restarted whenever it terminates, similarly to
respawn components.
powerfailThe process will be executed when the power goes down. Pies
will not wait for the process to finish.
powerfailnowThe process will be executed when the power is failing and the battery of the external UPS is almost empty.
powerokwaitThe process will be executed as soon as pies is informed that
the power has been restored.
powerwaitThe process will be executed when the power goes down. Pies
will wait for the process to finish before continuing.
sysinitThe process will be executed during system boot, before any boot
or bootwait entries. The ‘runlevel’ settings are ignored.
waitThe process will be started once when the specified runlevel is
entered. Pies will wait for its termination before starting
any other processes.
Command line to run. string is the full command line. Its first word (in the shell sense) is the name of the program to invoke.
Full file name of the program to run. When supplied, pies
will execute the program name instead of the first word in the
command statement. The latter, however, will be passed to
the running program as argv[0].
Define flags for this component. The flag-list is a comma-separated list of flags. Valid flags are:
Remove ANSI escape sequences from program output before logging it
as per strerr or stdout statements. See Output Redirectors.
disableThis component is disabled, i.e. pies will parse and
remember its settings, but will not start it.
expandenvExpand environment variables in the ‘command’ statement prior to running it. When used together with the ‘shell’ flag, this flag produces a warning and has no effect. See Early Environment Expansion, for a detailed discussion.
internalThis is an internal inetd component. See Built-in Inetd Services.
nullinputDo not close standard input. Redirect it from /dev/null
instead. Use this option with commands that require
their standard input to be open (e.g. pppd nodetach).
preciousMark this component as precious. Precious components are never
disabled by pies, even if they respawn too fast.
resolveWhen used with ‘sockenv’, the LOCALHOST and
REMOTEHOST environment variables will contain resolved host
names, instead of IP addresses.
shellRun command as /bin/sh -c "$command". Use this flag if command
contains shell-specific features, such as I/O redirections, pipes,
variables or the like. You can change the shell program using the
program statement. For example, to use Korn shell:
component X {
flags shell;
program "/bin/ksh";
command "myprog $HOME";
}
siggroupWhen stopping a component, send the signal to the process group, instead of to the process itself. Similarly, if a stopped process fails to terminate within a predefined timeout (see shutdown-timeout, send ‘SIGKILL’ to the process group of this process.
sockenvThis inetd component wants socket description variables in its environment. See Socket Environment Variables.
tcpmuxThis is a TCPMUX component. See TCPMUX Services.
tcpmuxplusThis is a TCPMUX+ component. See TCPMUX Services.
waitThis flag is valid only for ‘inetd’ components. It has the same
meaning as ‘wait’ in inetd.conf file, i.e. it tells
pies to wait for the server program to
return. See wait.
Defines signal which should be sent to terminate this component. The
default is SIGTERM. The argument sig is either the name
of a signal defined in /usr/include/signal.h, or
‘SIG+n’, where n is signal number.
The following subsections describe the rest of ‘component’ substatements.
Next: Notification, Previous: Preprocessor, Up: Pies Configuration File [Contents][Index]