aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pies.h')
-rw-r--r--src/pies.h53
1 files changed, 52 insertions, 1 deletions
diff --git a/src/pies.h b/src/pies.h
index 73b0583..9b3ae9d 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -122,6 +122,9 @@ struct pies_privs
enum pies_comp_mode
{
+ /*
+ ** Pies native component types.
+ */
/* Execute the component, no sockets are opened. This is the default
Pies mode. */
pies_comp_exec,
@@ -137,7 +140,47 @@ enum pies_comp_mode
/* Open a socket, start a component, and pass the socket fd to the
component via the UNIX domain socket. Corresponds to
`start_action = pass' in MeTA1. */
- pies_comp_pass_fd
+ pies_comp_pass_fd,
+
+ /*
+ ** Init-style components
+ */
+
+ /* Start the process when the specified runlevel is entered and wait
+ for its termination */
+ pies_comp_wait,
+ /* Execute the component once, when the specified runlevel is entered */
+ pies_comp_once,
+ /* Execute the component during system boot. Ignore runlevel settings. */
+ pies_comp_boot,
+ /* Execute the component during system boot and wait for it to terminate.
+ Ignore runlevel settings. */
+ pies_comp_bootwait,
+ /* Execute the component when the power goes down. */
+ pies_comp_powerfail,
+ /* Execute the component when the power goes down. Wait for it to
+ terminate. */
+ pies_comp_powerwait,
+ /* Execute the component when the power is restored. Wait for it to
+ terminate. */
+ pies_comp_powerokwait,
+ /* Execute the process when SIGINT is delivered, i.e. someone has
+ pressed the Ctrl+Alt+Del combination. */
+ pies_comp_ctrlaltdel,
+ /* Execute the component when a specified ondemand runlevel is called */
+ pies_comp_ondemand,
+ /* Execute the component on the system boot. */
+ pies_comp_sysinit,
+ /* Execute the component when running on the UPS and pies is informed that
+ the UPS battery is almost empty. */
+ pies_comp_powerfailnow,
+ /* Execute the component a signal from the keyboard handler arrives,
+ indicating that a special key combination was pressed on the console
+ keyboard. */
+ pies_comp_kbrequest,
+
+ /* Restart the component wherever it terminates */
+ pies_comp_respawn = pies_comp_exec,
};
#define CF_DISABLED 0x001 /* The componenet is disabled */
@@ -176,6 +219,9 @@ struct component
mode_t umask; /* Umask to install before starting */
limits_record_t limits; /* System limits */
+ /* For exec (init) components */
+ char *runlevels;
+
/* For inetd components */
size_t max_rate; /* Maximum number of invocations per minute */
size_t max_ip_connections; /* Max. number of connections per IP address */
@@ -225,7 +271,12 @@ extern char **mailer_argv;
extern size_t default_max_rate;
extern char *qotdfile;
+extern int init_process;
+extern char *console_device;
+extern int initdefault;
+
void register_prog (struct component *comp);
+int progman_running_p (void);
size_t progman_running_count (void);
void progman_start (void);
void progman_wake_sleeping (int);

Return to:

Send suggestions and report system problems to the System administrator.