chiark / gitweb /
log: make sure generators never log into the journal to avoid activation deadlocks
[elogind.git] / src / getty-generator / getty-generator.c
index 58ad8a66358e4b8a5d2cefc2d2e3d9321c8d19be..b2e4f52c3ca88ab55b0f051021c8d87d79632a60 100644 (file)
@@ -104,7 +104,7 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        log_set_target(LOG_TARGET_AUTO);
+        log_set_target(LOG_TARGET_SAFE);
         log_parse_environment();
         log_open();
 
@@ -116,7 +116,7 @@ int main(int argc, char *argv[]) {
         if (detect_container(NULL) > 0) {
                 log_debug("Automatically adding console shell.");
 
-                if (add_symlink("console-shell.service", "console-shell.service") < 0)
+                if (add_symlink("console-getty.service", "console-getty.service") < 0)
                         r = EXIT_FAILURE;
 
                 /* Don't add any further magic if we are in a container */