Drop confusing splash cmdline and --enable-progress configure option

This patch reverts back to the progress/status behavior of Finit < v3.0
because this is what most users expect, including the maintainer.  The
resulting code and configure script is a lot simpler to understand and
maintain:

- No more --enable-progress or --enable-progress-classic configure
  flags.  Instead a progress_style variable in helpers.c that can
  be changed at compile time for those that really need it.
- No more 'splash' kernel commnand line option.  This turned out to
  be *very* confusing to many users who believed it was some sort of
  graphical splash screen à la Plymouth.

Also, when Finit debug is enabled we now have a global 'debug' flag
which now alo controls if klogctl() should be called to prevent the
kernel logs to the console or not.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-02-14 20:11:08 +01:00
parent 13a33d345b
commit 35e4e0d073
13 changed files with 55 additions and 130 deletions
+9 -9
View File
@@ -55,9 +55,9 @@
int runlevel = 0; /* Bootstrap 'S' */
int cfglevel = RUNLEVEL; /* Fallback if no configured runlevel */
int prevlevel = -1;
int debug = 0; /* debug mode from kernel cmdline */
int rescue = 0; /* rescue mode from kernel cmdline */
int single = 0; /* single user mode from kernel cmdline */
int splash = 0; /* splash + progress enabled on kernel cmdline */
char *sdown = NULL;
char *network = NULL;
char *hostname = NULL;
@@ -78,7 +78,8 @@ static void banner(void)
* similar enabled to start emptying /dev/kmsg, but for
* our progress we want to own the console.
*/
klogctl(6, NULL, 0);
if (!debug)
klogctl(6, NULL, 0);
/*
* First level hooks, if you want to run here, you're
@@ -86,9 +87,6 @@ static void banner(void)
*/
plugin_run_hooks(HOOK_BANNER);
if (log_is_silent())
return;
print_banner(INIT_HEADING);
}
@@ -310,8 +308,10 @@ static void finalize(void)
service_step_all(SVC_TYPE_ANY);
/* Enable silent mode before starting TTYs */
_d("Going silent ...");
log_silent();
if (!debug) {
_d("Going silent ...");
show_progress(0);
}
/* Delayed start of TTYs at bootstrap */
_d("Launching all getty services ...");
@@ -381,7 +381,7 @@ int main(int argc, char *argv[])
fs_init();
/*
* Parse /proc/cmdline (debug, rescue, splash, console=, etc.)
* Parse /proc/cmdline (debug, rescue, console=, etc.)
* Also calls log_init() to set correct log level
*/
conf_parse_cmdline(argc, argv);
@@ -407,7 +407,7 @@ int main(int argc, char *argv[])
umask(0);
/* Set up canvas */
if (!rescue && !log_is_debug())
if (!rescue && !debug)
screen_init();
/*