mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Add support for auto-detetcing OS heading for progress
This patch removes the cognitive overhead of having to manually set your OS heading, --with-heading="Foo OS vX.YY". As of this patch, Finit by default extracts PRETTY_NAME from /etc/os-release. It is now possible to also disable the heading entirely using --without-heading Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+9
-1
@@ -66,6 +66,7 @@ char *network = NULL;
|
||||
char *hostname = NULL;
|
||||
char *rcsd = FINIT_RCSD;
|
||||
char *runparts = NULL;
|
||||
char *osheading = NULL;
|
||||
|
||||
uev_ctx_t *ctx = NULL; /* Main loop context */
|
||||
svc_t *wdog = NULL; /* No watchdog by default */
|
||||
@@ -90,7 +91,14 @@ static void banner(void)
|
||||
*/
|
||||
plugin_run_hooks(HOOK_BANNER);
|
||||
|
||||
print_banner(INIT_HEADING);
|
||||
#ifdef INIT_OSHEADING
|
||||
osheading = INIT_OSHEADING;
|
||||
if (osheading) {
|
||||
if (!osheading[0])
|
||||
osheading = release_heading();
|
||||
print_banner(osheading);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user