summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-03 17:58:51 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-03 17:58:51 +0000
commit9cf73c9e6387e681ae6a991ac003ef920835c27f (patch)
tree67d47aea3e7660e67dd42698abb5088799eadd99
parent3b5f4f9251fe0e3e7ed9da0985568f9d421605bc (diff)
downloaddrakx-kbd-mouse-x11-9cf73c9e6387e681ae6a991ac003ef920835c27f.tar
drakx-kbd-mouse-x11-9cf73c9e6387e681ae6a991ac003ef920835c27f.tar.gz
drakx-kbd-mouse-x11-9cf73c9e6387e681ae6a991ac003ef920835c27f.tar.bz2
drakx-kbd-mouse-x11-9cf73c9e6387e681ae6a991ac003ef920835c27f.tar.xz
drakx-kbd-mouse-x11-9cf73c9e6387e681ae6a991ac003ef920835c27f.zip
Fix setting systemd default.target to requested runlevel (mga#22593)
-rw-r--r--NEWS2
-rw-r--r--lib/Xconfig/various.pm3
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index e7be5f2..1c712f5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix setting systemd default.target to requested runlevel (mga#22593)
+
Version 1.24 - 22 June 2018
- correct Serbian and Yugoslavian xkb symbols file (martinw, mga#22157)
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm
index d98df16..7d245f2 100644
--- a/lib/Xconfig/various.pm
+++ b/lib/Xconfig/various.pm
@@ -225,9 +225,10 @@ sub config {
sub runlevel {
my ($o_runlevel) = @_;
+ # inittab is no more, but we may still need this for upgrades
my $f = "$::prefix/etc/inittab";
- -r $f or log::l("missing inittab!!!"), return;
if ($o_runlevel) {
+ log::l("setting runlevel to $o_runlevel");
substInFile { s/^id:\d:initdefault:\s*$/id:$o_runlevel:initdefault:\n/ } $f if !$::testing;
my $t = "/lib/systemd/system/runlevel$o_runlevel.target";
if (!$::testing && -f "$::prefix$t") {