summaryrefslogtreecommitdiff
path: root/src/update-utmp
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-18 20:17:49 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-18 20:20:14 +0100
commitd5d8429a12c4b1ef0dcd226c0904f00f4fa4898a (patch)
treefe51dbfdc85d449e740bb7c673a24a78882360f2 /src/update-utmp
parentac49d36faef5739d0e9db5742b780c4fb88e68bf (diff)
downloadsystemd-d5d8429a12c4b1ef0dcd226c0904f00f4fa4898a.tar.gz
everywhere: remove configurability of sysv runlevel to target mapping
With this change runlevel 2, 3, 4 are mapped to multi-user.target for good, and 5 to graphical.target. This was already the previous mapping but is now no longer reconfigurable, but hard-coded into the core. This should generally simplify things, but also fix one bug: the sysv-generator previously generated symlinks to runlevel[2-5].target units, which possibly weren't picked up if these aliases were otherwise only referenced by the real names "multi-user.target" and "graphical.target". We keep compat aliases "runlevel[2345].target" arround for cases where this target name is explicitly requested.
Diffstat (limited to 'src/update-utmp')
-rw-r--r--src/update-utmp/update-utmp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
index 15da83193b..5e7498c9e2 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/update-utmp/update-utmp.c
@@ -80,11 +80,9 @@ static int get_current_runlevel(Context *c) {
* 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 },
- { '3', SPECIAL_RUNLEVEL3_TARGET },
- { '4', SPECIAL_RUNLEVEL4_TARGET },
- { '2', SPECIAL_RUNLEVEL2_TARGET },
- { '1', SPECIAL_RESCUE_TARGET },
+ { '5', SPECIAL_GRAPHICAL_TARGET },
+ { '3', SPECIAL_MULTI_USER_TARGET },
+ { '1', SPECIAL_RESCUE_TARGET },
};
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;