chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc8e15c
)
log: reopen console so that we have logging on shutdown
author
Lennart Poettering
<lennart@poettering.net>
Tue, 19 Oct 2010 22:56:26 +0000
(
00:56
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 19 Oct 2010 22:56:26 +0000
(
00:56
+0200)
src/log.c
patch
|
blob
|
history
diff --git
a/src/log.c
b/src/log.c
index d82747ea8c914459997a254c9435a2d563721977..575ed51de1d48a87cdb7cc633f76f2f828d0b54d 100644
(file)
--- a/
src/log.c
+++ b/
src/log.c
@@
-212,6
+212,9
@@
int log_open(void) {
}
log_close_syslog();
+
+ /* Get the real /dev/console if we are PID=1, hence reopen */
+ log_close_console();
return log_open_console();
}
@@
-519,10
+522,9
@@
void log_parse_environment(void) {
if (log_show_color_from_string(e) < 0)
log_warning("Failed to parse bool %s. Ignoring.", e);
- if ((e = getenv("SYSTEMD_LOG_LOCATION")))
{
+ if ((e = getenv("SYSTEMD_LOG_LOCATION")))
if (log_show_location_from_string(e) < 0)
log_warning("Failed to parse bool %s. Ignoring.", e);
- }
}
LogTarget log_get_target(void) {