chiark / gitweb /
units: invoke sulogin instead of /bin/sh
[elogind.git] / src / update-utmp.c
index d0236867a78ebb8ac7879d5bebd0d9457b6be06d..3ec0a16c2a20ba9cd1dd51b356c311b5951d1325 100644 (file)
@@ -1,4 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
 /***
   This file is part of systemd.
@@ -22,7 +22,6 @@
 #include <assert.h>
 #include <errno.h>
 #include <string.h>
-#include <libaudit.h>
 #include <sys/types.h>
 #include <unistd.h>
 
@@ -117,10 +116,10 @@ static int get_current_runlevel(Context *c) {
                 /* The first target of this list that is active or has
                  * a job scheduled wins */
                 { '5', SPECIAL_RUNLEVEL5_TARGET },
-                { '4', SPECIAL_RUNLEVEL4_TARGET },
                 { '3', SPECIAL_RUNLEVEL3_TARGET },
+                { '4', SPECIAL_RUNLEVEL4_TARGET },
                 { '2', SPECIAL_RUNLEVEL2_TARGET },
-                { '1', SPECIAL_RESCUE_TARGET },
+                { 'S', SPECIAL_RESCUE_TARGET },
         };
         const char
                 *interface = "org.freedesktop.systemd1.Unit",
@@ -369,6 +368,7 @@ int main(int argc, char *argv[]) {
 
         log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
         log_parse_environment();
+        log_open();
 
 #ifdef HAVE_AUDIT
         if ((c.audit_fd = audit_open()) < 0)