chiark / gitweb /
main: don't open console in --test mode
[elogind.git] / main.c
diff --git a/main.c b/main.c
index 0aa3796e878755fe3bce4df60f508c8d69fe9870..d2721fd0996ea975a17b4a4d328fecedd21263eb 100644 (file)
--- a/main.c
+++ b/main.c
@@ -615,7 +615,7 @@ int main(int argc, char *argv[]) {
 
         /* Reset the console, but only if this is really init and we
          * are freshly booted */
-        if (running_as == MANAGER_INIT)
+        if (running_as == MANAGER_INIT && action == ACTION_RUN)
                 console_setup(getpid() == 1 && !serialization);
 
         /* Make sure D-Bus doesn't fiddle with the SIGPIPE handlers */
@@ -668,7 +668,7 @@ int main(int argc, char *argv[]) {
                 }
 
                 if (action == ACTION_TEST) {
-                        printf(" By units:\n");
+                        printf("-> By units:\n");
                         manager_dump_units(m, stdout, "\t");
                 }
 
@@ -678,7 +678,7 @@ int main(int argc, char *argv[]) {
                 }
 
                 if (action == ACTION_TEST) {
-                        printf(" By jobs:\n");
+                        printf("-> By jobs:\n");
                         manager_dump_jobs(m, stdout, "\t");
                         retval = 0;
                         goto finish;