chiark / gitweb /
utmp: document that the order of preference for runlevel numbers might be something...
[elogind.git] / src / update-utmp.c
index 5a48bd98dd9cf682f829933513d09a00b28fa4d4..336594fc7a25d25319b54d835aa3458d7cab2549 100644 (file)
@@ -114,12 +114,15 @@ static int get_current_runlevel(Context *c) {
                 const char *special;
         } table[] = {
                 /* The first target of this list that is active or has
-                 * a job scheduled wins */
+                 * a job scheduled wins. We prefer runlevels 5 and 3
+                 * here over the others, since these are the main
+                 * runlevels used on Fedora. It might make sense to
+                 * change the order on some distributions. */
                 { '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",