summaryrefslogtreecommitdiff
path: root/source/x/x11/patch/xinit/xinit.remove.systemd.kludge.diff
blob: f51e4628d3b4bfe9687051bf77634fff263d41b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- ./startx.cpp.orig	2014-09-11 12:31:42.000000000 -0500
+++ ./startx.cpp	2015-03-29 23:35:06.133875707 -0500
@@ -192,10 +192,12 @@
     XCOMM When starting the defaultserver start X on the current tty to avoid
     XCOMM the startx session being seen as inactive:
     XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
-    tty=$(tty)
-    if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
-        tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
-        vtarg="vt$tty_num"
+    if [ -x /usr/lib/systemd/systemd -o -x /lib/systemd/systemd ]; then
+        tty=$(tty)
+        if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
+            tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+            vtarg="vt$tty_num"
+        fi
     fi
 #endif