path: root/src/comp.c
authorSergey Poznyakoff <>2019-06-24 09:56:24 (GMT)
committer Sergey Poznyakoff <>2019-06-24 09:56:24 (GMT)
commit006bfbc5235c181783445d321ce7a7e3c6d8bd8a (patch) (unidiff)
treef483e0d30c3e801add01b372b24a342281b70b86 /src/comp.c
parentcb90ca582a46ef9f0779837dc4c6fb00656e70c9 (diff)
Enable/disable SystemV init code at compile time
* New option --enable-sysvinit. Disable the init code if RUN_LVL is not available. (PIES_SYSVINIT_ENABLED): New configuration define. (PIES_COND_SYSVINIT): New condition Print configuration settings summary. * src/pies.h (is_sysvinit): Check for PIES_SYSVINIT_ENABLED. (SYSVINIT_ACTIVE): New macro. * grecs: Upgrade. * src/ Conditionally link sysvinit-related code. * src/cmdline.opt: Disable the --telinit option if sysvinit support is not available. (parse_options): Use SYSVINIT_ACTIVE in the conditional. * src/comp.c (component_verify): Check if component definition is allowed by the current state of the sysvinit support. * src/ctl.c: Disable the /runlevel entry point if sysvinit support is not compiled. * src/diag.c (stderr_open): Make sure sysvinit-related code is not compiled if the sysvinit support is not available. * src/pies.c (config_syntax_tab): Add entry for CONF_INITTAB only if sysvinit support is available. (_cb_initdefault,_cb_runlevels): Remove. Use cb_initdefault and cb_runlevels instead. (component_keywords): Disable runlevels without sysvinit support. (pies_keywords): Same for initdefault. Use SYSVINIT_ACTIVE to suppress compilation of sysvinit code without sysvinit support. * src/progman.c: Use SYSVINIT_ACTIVE to suppress compilation of sysvinit code without sysvinit support. * src/sysvinit.c (cb_initdefault,cb_runlevels): New functions.
Diffstat (limited to 'src/comp.c') (more/less context) (ignore whitespace changes)
1 files changed, 3 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c
index 6eeeeed..7b2b373 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -674,6 +674,9 @@ component_verify (struct component *comp, grecs_locus_t *locus)
674 return 1; 674 return 1;
675 } 675 }
676 default: 676 default:
677 if (PIES_SYSVINIT_ENABLED && comp->mode >= pies_mark_sysvinit)
678 COMPERR (grecs_error,
679 "%s", _("SystemV init support is not compiled in"));
677 /* FIXME: more checks perhaps */ 680 /* FIXME: more checks perhaps */
678 break; 681 break;
679 } 682 }

Return to:

Send suggestions and report system problems to the System administrator.