[PATCH] Move xhost handling to the xinit script (#1045280)

David Shea dshea at redhat.com
Fri Dec 20 19:58:22 UTC 2013


This way we can connect to the X server if the hostname changes before
liveinst starts.
---
 data/liveinst/liveinst       | 3 ---
 data/liveinst/zz-liveinst.sh | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index 5660db1..99451ed 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -149,9 +149,6 @@ if [ ! -z "$UPDATES" ]; then
     export PATH=/tmp/updates:$PATH
 fi
 
-# Prevents breakage if the hostname is changed during the install
-xhost +si:localuser:root
-
 if [ -x /usr/bin/udisks ]; then
     /usr/bin/udisks --inhibit -- $ANACONDA $*
 else
diff --git a/data/liveinst/zz-liveinst.sh b/data/liveinst/zz-liveinst.sh
index c141290..137a754 100755
--- a/data/liveinst/zz-liveinst.sh
+++ b/data/liveinst/zz-liveinst.sh
@@ -2,6 +2,9 @@
 # Set up a launcher on the desktop for the live installer if we're on
 # a live CD
 
+# Prevents breakage if the hostname is changed before or during the install
+[ -x /usr/bin/xhost ] && xhost +si:localuser:root > /dev/null 2>&1
+
 # don't run on geode (olpc)
 if [ `grep -c Geode /proc/cpuinfo` -eq 0 ]; then
   if [ -b /dev/mapper/live-osimg-min ]; then
-- 
1.8.4.2



More information about the anaconda-patches mailing list