From 9828f9a5ca4c0b65c7d7dd2d7de9ee909ecaa6dd Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Fri, 27 Feb 2009 14:19:32 -0600
Subject: Reworked the order for things in xconfig. REF FS#238.

This does not fix 238, but it was discovered while looking at it.
The bug reported in 238 does not appear to exisit.
---
 abs/core-testing/LinHES-config/PKGBUILD   |  2 +-
 abs/core-testing/LinHES-config/xconfig.sh | 27 +++++++++++++++------------
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 7682002..cea9c1c 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=LinHES-config
 pkgver=1.0
-pkgrel=287
+pkgrel=290
 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
 pkgdesc="Install and configure your system"
 depends=(bc libstatgrab  mysql-python expect curl dnsutils parted sg3_utils nmbscan )
diff --git a/abs/core-testing/LinHES-config/xconfig.sh b/abs/core-testing/LinHES-config/xconfig.sh
index eaa84b6..e2a48ed 100755
--- a/abs/core-testing/LinHES-config/xconfig.sh
+++ b/abs/core-testing/LinHES-config/xconfig.sh
@@ -5,6 +5,7 @@ BASE=""
 . /etc/profile
 NVIDIA_96XX="$TEMPLATES/xorg/96xx_supported.txt"
 #TEMPLATES="/usr/share/templates"
+MYTHHOME=$BASE/home/mythtv
 
 function Xvalues {
     CMDLINE=$(cat /proc/cmdline)
@@ -23,29 +24,31 @@ function Xvalues {
 }
 
 function presetupX {
-    if [ "$XUseAdvanced" = 1 ]
+    if [ -f /etc/sysconfig/IGNORE_X ]
     then
+        echo "Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X"
+        return 1
+    else
         if  [ "$XIgnoreConfig" = 1 ]
         then
             echo "Using User supplied X"
-            if [ -f "$BASE/data/home/mythtv/templates/xorg.user" ]
+            if [ -f "$MYTHHOME/templates/xorg.user" ]
             then
-                cp -f "$BASE/data/home/mythtv/templates/xorg.user" "$XORG_CONF"
+                cp -f "$MYTHHOME/templates/xorg.user" "$XORG_CONF"
             else
                 echo "Didn't find the file"
-                echo "Copy your config file to $BASE/data/home/mythtv/templates/xorg.use" >> "$XORG_CONF"
+                echo "Copy your config file to $MYTHHOME/templates/xorg.user" > "$XORG_CONF"
             fi
         else
-            setupAdvancedX
-        fi
-    else
-        if [ -f /etc/sysconfig/IGNORE_X ]
-        then
-            echo "Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X"
-        else
-            setupX
+            if [ "$XUseAdvanced" = 1 ]
+            then
+                setupAdvancedX
+            else
+                setupX
+            fi
         fi
     fi
+
 }
 
 function setupAdvancedX {
-- 
cgit v0.12

