mirror of
https://github.com/systemd/systemd.git
synced 2025-03-08 08:58:27 +03:00
hib-res-generator: open logging before emitting the first message
Also add a debug message when we are not in initrd, because it can be confusing why nothing is happenning.
This commit is contained in:
parent
0307ea49c7
commit
a79858bfd1
@ -60,6 +60,13 @@ static int process_resume(void) {
|
||||
int main(int argc, char *argv[]) {
|
||||
int r = 0;
|
||||
|
||||
log_set_prohibit_ipc(true);
|
||||
log_set_target(LOG_TARGET_AUTO);
|
||||
log_parse_environment();
|
||||
log_open();
|
||||
|
||||
umask(0022);
|
||||
|
||||
if (argc > 1 && argc != 4) {
|
||||
log_error("This program takes three or no arguments.");
|
||||
return EXIT_FAILURE;
|
||||
@ -68,16 +75,11 @@ int main(int argc, char *argv[]) {
|
||||
if (argc > 1)
|
||||
arg_dest = argv[1];
|
||||
|
||||
log_set_prohibit_ipc(true);
|
||||
log_set_target(LOG_TARGET_AUTO);
|
||||
log_parse_environment();
|
||||
log_open();
|
||||
|
||||
umask(0022);
|
||||
|
||||
/* Don't even consider resuming outside of initramfs. */
|
||||
if (!in_initrd())
|
||||
if (!in_initrd()) {
|
||||
log_debug("Not running in an initrd, quitting.");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, 0);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user