main: let's move the arg_show_status check into status_welcome()

It's kinda nice to hide this check inside of status_welcome() itself, so
that it handles all this on its own.
This commit is contained in:
Lennart Poettering 2017-12-15 17:00:35 +01:00
parent a70c72a046
commit fd8c85c652

View file

@ -1338,6 +1338,9 @@ static int status_welcome(void) {
_cleanup_free_ char *pretty_name = NULL, *ansi_color = NULL;
int r;
if (arg_show_status <= 0)
return 0;
r = parse_env_file("/etc/os-release", NEWLINE,
"PRETTY_NAME", &pretty_name,
"ANSI_COLOR", &ansi_color,
@ -1915,9 +1918,7 @@ static int initialize_runtime(
*/
if (arg_system && !skip_setup) {
if (arg_show_status > 0)
status_welcome();
status_welcome();
hostname_setup();
machine_id_setup(NULL, arg_machine_id, NULL);
loopback_setup();