summarylogtreecommitdiffstats
path: root/startx-posix.patch
blob: 4a87232893972e1b8dfb2b87dc8df1af6fccbb7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- xinit-1.4.1-orig/startx.cpp	2019-09-21 12:59:28.894675922 -0400
+++ xinit-1.4.1/startx.cpp	2019-09-21 12:59:58.674672355 -0400
@@ -205,7 +205,7 @@
     XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
     tty=$(tty)
     if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
-        tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+        tty_num=$(echo "$tty" | sed -E 's/[a-zA-Z\/]//g')
         vtarg="vt$tty_num -keeptty"
     fi
 #endif
@@ -252,7 +252,7 @@
     XCOMM set up default Xauth info for this machine
     case `uname` in
     Linux*)
-        if [ -z "`hostname --version 2>&1 | grep GNU`" ]; then
+        if [ -n "`hostname --version 2>&1 | grep GNU`" ]; then
             hostname=`hostname -f`
         else
             hostname=`hostname`