status: show status messages unconditionally if plymouth is around

This commit is contained in:
Lennart Poettering 2011-03-30 02:21:48 +02:00
parent 871c44a747
commit 6faa11140b
4 changed files with 11 additions and 7 deletions

View file

@ -1093,11 +1093,6 @@ int main(int argc, char *argv[]) {
goto finish;
}
/* If Plymouth is being run make sure we show the status, so
* that there's something nice to see when people press Esc */
if (access("/run/initramfs/plymouth", F_OK) >= 0)
arg_show_status = true;
if (arg_action == ACTION_HELP) {
retval = help();
goto finish;
@ -1177,7 +1172,7 @@ int main(int argc, char *argv[]) {
if (arg_running_as == MANAGER_SYSTEM && !serialization) {
locale_setup();
if (arg_show_status)
if (arg_show_status || plymouth_running())
status_welcome();
kmod_setup();

View file

@ -2254,7 +2254,10 @@ void unit_status_printf(Unit *u, const char *format, ...) {
if (u->meta.manager->running_as != MANAGER_SYSTEM)
return;
if (!u->meta.manager->show_status)
/* If Plymouth is running make sure we show the status, so
* that there's something nice to see when people press Esc */
if (!u->meta.manager->show_status && !plymouth_running())
return;
if (!manager_is_booting_or_shutting_down(u->meta.manager))

View file

@ -4188,6 +4188,10 @@ bool nulstr_contains(const char*nulstr, const char *needle) {
return false;
}
bool plymouth_running(void) {
return access("/run/initramfs/plymouth", F_OK) >= 0;
}
static const char *const ioprio_class_table[] = {
[IOPRIO_CLASS_NONE] = "none",
[IOPRIO_CLASS_RT] = "realtime",

View file

@ -392,6 +392,8 @@ int kill_and_sigcont(pid_t pid, int sig);
bool nulstr_contains(const char*nulstr, const char *needle);
bool plymouth_running(void);
#define NULSTR_FOREACH(i, l) \
for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)