From 42a202a723ee26e78622b4031f5aceae38c2d896 Mon Sep 17 00:00:00 2001
From: Bob Igo <bob@stormlogic.com>
Date: Wed, 5 Aug 2009 15:06:46 -0400
Subject: LinHES-run can now trigger brand-specific tweaks, assuming hardware
 type is saved in /myth/.special_hardware_type

---
 abs/core-testing/LinHES-system/LinHES-run | 22 ++++++++++++++++++++++
 abs/core-testing/LinHES-system/PKGBUILD   |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/abs/core-testing/LinHES-system/LinHES-run b/abs/core-testing/LinHES-system/LinHES-run
index 9e975ac..640b2f3 100644
--- a/abs/core-testing/LinHES-system/LinHES-run
+++ b/abs/core-testing/LinHES-system/LinHES-run
@@ -26,13 +26,35 @@ then
     echo "Alt+h for help"  | osd_cat --font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" --shadow=3 --pos=middle --align=centre --offset=200 --color=yellow --delay=5 &
 fi
 
+# Run any scripting that applies to special hardware.  These brand-specific commands that run
+# after Tweaker will, of course, override generic or hardware-specific settings.
+SpecialHardwareCommands() {
+    special_hardware_file=/myth/.special_hardware_type
+    special_hardware=`cat $special_hardware_file`
+
+    case $special_hardware in
+	dragon*)
+	    sudo -E twk_audio.pl --implement digital
+	    sudo -E twk_dragon.pl --implement all
+	    ;;
+	ausdragon*)
+	    ;;
+	*)
+	    # there are no brand-specific commands for configuring whatever
+	    # special hardware the user chose
+	    ;;
+    esac
+}
 
 if [ !  $SystemType = "Frontend_only" ]
 then
     if [  -f ~/.configure ]
     then
+	# Run Tweaker, which applies generic and hardware-specific settings
         sudo -E tweaker.pl
     	/bin/rm /tmp/fps # ??? clean up a temp file that will eventually be obsolete anyway
+	# Run any brand-specific commands, if necessary.
+	SpecialHardwareCommands
         sudo sv stop mythbackend
         xterm -fn *18* -e sudo taskset -c 0 /usr/bin/mythtv-setup
         sudo sv start mythbackend
diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD
index 2920d11..96a8b5e 100644
--- a/abs/core-testing/LinHES-system/PKGBUILD
+++ b/abs/core-testing/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=LinHES-system
 pkgver=1.0
-pkgrel=56
+pkgrel=59
 arch=('i686')
 MVDIR=$startdir/pkg/usr/LH
 BINDIR=$startdir/pkg/usr/bin
-- 
cgit v0.12