summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-16 12:41:43 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-16 12:41:43 +0000
commit197a6c8b3652077b51f78633198d11268693ca30 (patch)
treec6245eb2d73869172d67033344fc89d658323513 /lib
parent9f186b2e6008b093a4122f47e4b951b662e3cbca (diff)
downloaddrakx-kbd-mouse-x11-197a6c8b3652077b51f78633198d11268693ca30.tar
drakx-kbd-mouse-x11-197a6c8b3652077b51f78633198d11268693ca30.tar.gz
drakx-kbd-mouse-x11-197a6c8b3652077b51f78633198d11268693ca30.tar.bz2
drakx-kbd-mouse-x11-197a6c8b3652077b51f78633198d11268693ca30.tar.xz
drakx-kbd-mouse-x11-197a6c8b3652077b51f78633198d11268693ca30.zip
fix detecting whether X11 is started on boot or not (mga#3618)
handle both inittab & pure systemd
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 2f93a75..6777cf2 100644
--- a/lib/Xconfig/various.pm
+++ b/lib/Xconfig/various.pm
@@ -234,7 +234,8 @@ sub runlevel {
symlink($t, $d);
}
} else {
- cat_($f) =~ /^id:(\d):initdefault:\s*$/m && $1;
+ cat_($f) =~ /^id:(\d):initdefault:\s*$/m && return $1;
+ readlink("$::prefix/etc/systemd/system/default.target") =~ /runlevel(\d).target/m && return $1;
}
}