summaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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)
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/various.pm3
1 files changed, 2 insertions, 1 deletions
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") {