chiark / gitweb /
units: invoke sulogin instead of /bin/sh
[elogind.git] / src / update-utmp.c
index b5d733ca441a60d50443a04e926699f70993a259..3ec0a16c2a20ba9cd1dd51b356c311b5951d1325 100644 (file)
@@ -116,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",
@@ -368,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)