aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-01-04 14:22:24 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-01-04 14:22:24 +0200
commita9c18ad30ba6072ca460b2abc482374fb3c207b2 (patch)
treebd969853eaebe30e04fd8658d9ba323f6f6ff2ab /src/pies.h
parentcf14c349fad774e477a80d1c5e6572f21f17ced1 (diff)
downloadpies-a9c18ad30ba6072ca460b2abc482374fb3c207b2.tar.gz
pies-a9c18ad30ba6072ca460b2abc482374fb3c207b2.tar.bz2
Implement runlevel transitions.
* src/sysvinit.c: New file. * src/Makefile.am: Add new file. * src/pies.c (initdefault, dfl_level): Move to sysvinit.c (modetab): Add new modes. (inittrans): Move to sysvinit.c * src/pies.h (is_sysvinit): New macro. (dfl_level): New extern. (runlevel_match, inittrans, is_comp_wait): New protos. * src/progman.c (progman_running_p): Take into account only components. Use is_comp_wait to determine if the component should be waited for. (prog_start): Run sysvinit components only when started as init process. (runlevel_match): Move to sysvinit.c (prog_start_prerequisites): Return immediately if the component is disabled.
Diffstat (limited to 'src/pies.h')
-rw-r--r--src/pies.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pies.h b/src/pies.h
index 9b3ae9d..a679afd 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -147,6 +147,6 @@ enum pies_comp_mode
*/
-
+ pies_mark_sysvinit,
/* Start the process when the specified runlevel is entered and wait
for its termination */
- pies_comp_wait,
+ pies_comp_wait = pies_mark_sysvinit,
/* Execute the component once, when the specified runlevel is entered */
@@ -185,2 +185,4 @@ enum pies_comp_mode
+#define is_sysvinit(m) ((m)>=pies_mark_sysvinit)
+
#define CF_DISABLED 0x001 /* The componenet is disabled */
@@ -276,2 +278,3 @@ extern char *console_device;
extern int initdefault;
+extern int dfl_level;
@@ -447,2 +450,8 @@ struct inetd_builtin
struct inetd_builtin *inetd_builtin_lookup (const char *service, int socktype);
+
+/* sysvinit.c */
+int runlevel_match (struct component *comp);
+void inittrans (void);
+int is_comp_wait (struct component *comp);
+

Return to:

Send suggestions and report system problems to the System administrator.