From 197a6c8b3652077b51f78633198d11268693ca30 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 16 Mar 2013 12:41:43 +0000 Subject: fix detecting whether X11 is started on boot or not (mga#3618) handle both inittab & pure systemd --- NEWS | 2 ++ lib/Xconfig/various.pm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d2f2b4c..bc17fee 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- fix detecting whether X11 is started on boot or not (mga#3618) + Version 0.105 - 16 January 2013 - update translations 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; } } -- cgit v1.2.1