Next: , Previous: , Up: Configuration   [Contents][Index]


3.2 Component Statement

Config: component

The 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:

Config: component: mode mode

Declare the type (style) of the component. Following are the basic values for mode:

exec
respawn

Define a ‘respawn’ component (see respawn). This is the default.

inetd
nostartaccept

Define an ‘inetd-style’ component (see inetd-style).

pass
pass-fd

Define a ‘meta1-style’ component (see meta1-style).

accept

Define a ‘accept-style’ component (see accept-style).

When run as init process (see Init Process), the following modes are also allowed:

boot

The process will be executed during system boot. The ‘runlevel’ settings are ignored.

bootwait

The process will be executed during system boot. No other components will be started until it has terminated. The ‘runlevel’ settings are ignored.

ctrlaltdel

The 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.

kbrequest

The 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.

once

The process will be executed once when the specified runlevel is entered.

ondemand

The 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.

powerfail

The process will be executed when the power goes down. Pies will not wait for the process to finish.

powerfailnow

The process will be executed when the power is failing and the battery of the external UPS is almost empty.

powerokwait

The process will be executed as soon as pies is informed that the power has been restored.

powerwait

The process will be executed when the power goes down. Pies will wait for the process to finish before continuing.

sysinit

The process will be executed during system boot, before any boot or bootwait entries. The ‘runlevel’ settings are ignored.

wait

The process will be started once when the specified runlevel is entered. Pies will wait for its termination before starting any other processes.

Config: component: program name

Full file name of the component binary. This binary will be executed (via /bin/sh -c) each time pies decides it needs to start the component.

To supply command line arguments, use command statement.

Config: component: command string

Command line for the program. The argument should be just as arguments normally are, starting with the name of the program. The latter may be different from the one specified to program statement. Its value will be available to the program as argv[0].

Config: component: flags (flag-list)

Define flags for this component. The flag-list is a comma-separated list of flags. Valid flags are:

disable

This component is disabled, i.e. pies will parse and remember its settings, but will not start it.

nullinput

Do 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).

precious

Mark this component as precious. Precious components are never disabled by pies, even if they respawn too fast.

wait

This 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.

tcpmux

This is a TCPMUX component. See TCPMUX.

tcpmuxplus

This is a TCPMUX+ component. See TCPMUX.

internal

This is an internal inetd component. See builtin.

sockenv

This inetd component wants socket description variables in its environment. See sockenv.

resolve

When used with ‘sockenv’, the LOCALHOST and REMOTEHOST environment variables will contain resolved host names, instead of IP addresses.

siggroup

This flag affects the behavior of pies when a stopped process fails to terminate within a predefined timeout (see shutdown-timeout. Normally pies would send the ‘SIGKILL’ signal to such a process. If this flag is set, pies would send ‘SIGKILL’ to the process group of this process instead.

The following subsections describe the rest of ‘component’ substatements.


Next: , Previous: , Up: Configuration   [Contents][Index]