From 6ac5efa6f1def4663fd28bdf5fa26a5185635190 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Fri, 10 Apr 2009 11:47:05 -0500
Subject: linhes-config/system:  print to the console using printhl instead of
 echo

---
 abs/core-testing/LinHES-config/PKGBUILD            |  6 ++--
 .../LinHES-config/install_functions.sh             | 34 +++++++++++-----------
 abs/core-testing/LinHES-config/issue               |  3 +-
 abs/core-testing/LinHES-system/PKGBUILD            |  2 +-
 .../LinHES-system/load-modules-mythvantage.sh      |  6 ++--
 5 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 22b56bc..71a9e2a 100644
--- 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=383
+pkgrel=388
 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 system-templates )
@@ -17,11 +17,11 @@ build() {
     mkdir  $startdir/pkg/etc/profile.d
     install -m 0755 MythVantage.sh  $startdir/pkg/etc/profile.d/MythVantage.sh
     mkdir -p $MVDIR/bin
-    mkdir -p $MVDIR/templates
+ #   mkdir -p $MVDIR/templates
     mkdir -p $MVDIR/etc
 
 #copy in all the installer specific stuff
-    rsync -r --exclude=.svn ../templates $MVDIR/
+#    rsync -r --exclude=.svn ../templates $MVDIR/
     install -m0700 myth_user_call  $MVDIR/bin/myth_user_call
     install -m 0755 install_proxy.sh  $MVDIR/bin/install_proxy.sh
     install -m 0755 install_functions.sh  $MVDIR/bin/install_functions.sh
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh
index c26b6e3..ce9a057 100755
--- a/abs/core-testing/LinHES-config/install_functions.sh
+++ b/abs/core-testing/LinHES-config/install_functions.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 . /etc/profile
+
 disk=$2
 mountpoint=new_boot
 
@@ -14,7 +15,7 @@ BASE=""
 
 function update_db_settings () {
 
- echo "setting database value $1 to $2 for $hostname"
+ printhl "  setting database value $1 to $2 for $hostname"
  $MYSQLCMD_C "delete from settings where value='${1}' and hostname=\"$hostname\";"
  $MYSQLCMD_C "REPLACE INTO  settings set value='${1}', data='${2}' , hostname=\"$hostname\";"
 }
@@ -31,7 +32,7 @@ theme=($THEMES)                # Read into array variable.
 num_themes=${#theme[*]}        # Count how many elements.
 
 pick=${theme[$((RANDOM%num_themes))]}
-echo "Selected $pick as the theme"
+printhl "   Selected $pick as the theme"
 update_db_settings Theme "$pick"
 }
 
@@ -46,7 +47,7 @@ function parse_cmdline_2_db(){
 }
 
 
-function splash_setup (){
+function bootsplash_setup (){
     echo $CMDLINE | grep -q splash=silent
     if [ $? = 0 ]
     then
@@ -70,7 +71,7 @@ function setupremote {
             [ -e /etc/lircrc ] && chmod 755 /etc/lircrc
             update_db_settings HostRemoteType  "$Remotetype"
         #special case for special remote
-        echo "Starting with support for $Remotetype"
+        printhl "Starting with support for $Remotetype"
         if [ x$Remotetype = "xdvico" ]
         then
                 /usr/sbin/lircd  -d /dev/usb/hiddev0
@@ -85,7 +86,7 @@ function setupremote {
 }
 
 function scan_for_hpg_receiver() {
-echo "Scanning for Hauppauge receiver"
+printhl "   Scanning for Hauppauge receiver"
 for hpgid in `lspci -nm  -d4444: |cut -d" " -f6-  |tr -d '"'|tr " " :`
 do
     line=`grep $hpgid $TEMPLATES/remotes/i2c.id`
@@ -125,7 +126,7 @@ done
 
 function scan_for_usb_remote () {
 found_remote=1
-echo "Scanning for usb receiver/remote"
+printhl "   Scanning for usb receiver/remote"
 while read line
 do
     USBID=`echo "$line"|cut -d"|"  -f1`
@@ -133,7 +134,7 @@ do
     if [ $? = 0 ]
     then
         Remotetype=`echo "$line"|cut -d"|" -f2`
-        echo "Found $Remotetype"
+        printhl  "Found $Remotetype"
         setupremote
         found_remote=0
         break
@@ -143,7 +144,7 @@ if [ $found_remote = 1 ]
 then
     scan_for_hpg_receiver
 fi
-echo "Scanning for TatIR..."
+printhl "   Scanning for TatIR"
 if lsusb | grep 04d8:0004 > /dev/null 2>/dev/null
 then
 	/usr/bin/PyroUsb.py > /dev/null 2>&1 &
@@ -160,10 +161,10 @@ function rest_of_network () {
         /sbin/ifconfig eth0 $IP netmask $NETMASK
         nm=`/usr/bin/nmconv.py -obits  $NETMASK`
         NETMASK="/$nm $NETMASK"
-        echo $NETMASK
+        #echo $NETMASK
         update_db_settings HostNETMASK${MYTHDEFAULT} "$NETMASK"
     else
-        echo "netmask not found"
+        printhl "   Netmask not found"
     fi
     #gateway
     echo $CMDLINE | grep -q gateway
@@ -173,9 +174,8 @@ function rest_of_network () {
         GATEWAY=${TEMPVAR%% *}
         /sbin/route add default  gw $GATEWAY
         update_db_settings HostGW${MYTHDEFAULT} "$GATEWAY"
-
-        else
-        echo "gateway not found"
+    else
+        printhl  "  Gateway not found"
     fi
 
     #dns
@@ -187,7 +187,7 @@ function rest_of_network () {
         echo "nameserver $DNS" >> /etc/resolv.conf
         update_db_settings HostDNS${MYTHDEFAULT} "$DNS"
         else
-        echo "DNS not found"
+            printhl "    DNS not found"
     fi
 }
 
@@ -469,7 +469,7 @@ mapdev() {
             echo "$grubdevice,$pnum)"
         fi
     else
-        echo "DEVICE NOT FOUND"
+        echo "Grub DEVICE NOT FOUND"
     fi
 }
 
@@ -478,10 +478,10 @@ dogrub() {
     get_grub_map
     sync
     ROOTDEV=/dev/$1
-    echo $ROOTDEV
+    echo  "ROOTDEV: $ROOTDEV"
 
     bootdev=$(mapdev $ROOTDEV)
-    echo $bootdev
+    echo "bootdev: $bootdev"
     cp -a /$mountpoint/usr/lib/grub/i386-pc/* /$mountpoint/boot/grub/
     sync
     # freeze xfs filesystems to enable grub installation on xfs filesystems
diff --git a/abs/core-testing/LinHES-config/issue b/abs/core-testing/LinHES-config/issue
index 3c01679..00d4abd 100644
--- a/abs/core-testing/LinHES-config/issue
+++ b/abs/core-testing/LinHES-config/issue
@@ -1 +1,2 @@
-LinHes
\ No newline at end of file
+LinHes
+
diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD
index a25db9d..7d68a99 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=49
+pkgrel=51
 arch=('i686')
 MVDIR=$startdir/pkg/usr/LH
 BINDIR=$startdir/pkg/usr/bin
diff --git a/abs/core-testing/LinHES-system/load-modules-mythvantage.sh b/abs/core-testing/LinHES-system/load-modules-mythvantage.sh
index 142f7c2..4f5ea91 100755
--- a/abs/core-testing/LinHES-system/load-modules-mythvantage.sh
+++ b/abs/core-testing/LinHES-system/load-modules-mythvantage.sh
@@ -1,7 +1,9 @@
 #!/bin/bash
 #/usr/bin/load-modules-mythvantage.sh  UNLOAD LCD
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
 . /etc/systemconfig
-
 case $1 in
 UNLOAD|unload )
             MODULELIST=`grep /etc/modules.mythvantage $2`
@@ -12,7 +14,7 @@ UNLOAD|unload )
 
             ;;
 
-   *)   echo "- Loading MythVantage-modules"
+   *)   printhl "    Loading MythVantage-modules"
         #try to load the cx88 modules
         if [ ! x$SystemType = xFrontend_only ]
         then
-- 
cgit v0.12

