summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2008-11-30 04:11:03 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2008-11-30 04:11:03 (GMT)
commitf78fc8e0364cb99bf0b3c2fc941ba85c2fe5944f (patch)
tree35b4ab3030640a144537124112e3d65d138672f5 /abs/core-testing/LinHES-config
parentfba7ea15ad46f8655bf17ab4c1cc5a8228d39e1b (diff)
parentf0da28db238a7c58552446e2d87bae48a0f9718b (diff)
downloadlinhes_pkgbuild-f78fc8e0364cb99bf0b3c2fc941ba85c2fe5944f.zip
linhes_pkgbuild-f78fc8e0364cb99bf0b3c2fc941ba85c2fe5944f.tar.gz
linhes_pkgbuild-f78fc8e0364cb99bf0b3c2fc941ba85c2fe5944f.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/LinHES-config')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD4
-rwxr-xr-xabs/core-testing/LinHES-config/install-ui.xml6
-rwxr-xr-xabs/core-testing/LinHES-config/install_functions.sh19
-rwxr-xr-xabs/core-testing/LinHES-config/install_proxy.sh43
-rw-r--r--abs/core-testing/LinHES-config/restore_km_db_chroot.sh15
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.sh18
-rwxr-xr-xabs/core-testing/LinHES-config/templates/xorg/xorg.conf.vesa72
-rwxr-xr-xabs/core-testing/LinHES-config/timezone.binbin805819 -> 806343 bytes
-rwxr-xr-xabs/core-testing/LinHES-config/xconfig.sh14
9 files changed, 167 insertions, 24 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 030d976..68dc6c8 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,9 +1,9 @@
pkgname=LinHES-config
pkgver=1.0
-pkgrel=6
+pkgrel=34
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)
+depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan hwd)
arch=('i686')
source=(mythinstall.bin myth_user_call file_time_offset.py install-ui.xml install_proxy.sh install_functions.sh systemconfig.sh install_db_chroot.sh restore_default_settings.sh xconfig.sh timezip.py soundconfig.sh LinHES-release issue MythVantage.sh create_master.sh build_diskless.sh networkconfig.sh timezone.bin autocard.py restore_km_db_chroot.sh)
diff --git a/abs/core-testing/LinHES-config/install-ui.xml b/abs/core-testing/LinHES-config/install-ui.xml
index 0ec9ddb..b7a67de 100755
--- a/abs/core-testing/LinHES-config/install-ui.xml
+++ b/abs/core-testing/LinHES-config/install-ui.xml
@@ -1,6 +1,6 @@
<!--
- This is a myth style theme file for mythwelcome
+ This is a myth style theme file for mythvantage
(c) 2005 by a whole bunch of people associated with MythTV
@@ -17,7 +17,7 @@
<font name="title" face="Arial">
<color>#ffff00</color>
<dropcolor>#000000</dropcolor>
- <size>24</size>
+ <size>22</size>
<shadow>3,3</shadow>
<bold>yes</bold>
</font>
@@ -73,7 +73,7 @@
<multiline>no</multiline>
<font>title</font>
<area>50,40,700,40</area>
- <value>LinHes: The Linux Home Entertainment System </value>
+ <value>LinHES: The Linux Home Entertainment System </value>
</textarea>
<!--
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh
index e5912da..07bc4fa 100755
--- a/abs/core-testing/LinHES-config/install_functions.sh
+++ b/abs/core-testing/LinHES-config/install_functions.sh
@@ -35,7 +35,7 @@ update_db_settings Theme "$pick"
function setupremote {
- mv -f $BASE/etc/lircd.conf $BASE/etc/lircd.conf.`date +%Y-%m-%d-%H-%M` 2>/dev/null
+ [ -e $BASE/etc/lircd.conf ] && mv -f $BASE/etc/lircd.conf $BASE/etc/lircd.conf.`date +%Y-%m-%d-%H-%M`
if [ -d $TEMPLATES/remotes/$Remotetype ]
then
cd $TEMPLATES/remotes/$Remotetype
@@ -43,12 +43,19 @@ function setupremote {
do
cat $i >> $BASE/etc/lircd.conf
done
- cp -f lircrc* $BASE/etc/lircrc
- chmod 755 /etc/lircrc
+ cp -f lircrc* $BASE/etc/lircrc 2> /dev/null
+ [ -e /etc/lircrc ] && chmod 755 /etc/lircrc
update_db_settings HostRemoteType "$Remotetype"
- /usr/sbin/lircd -d /dev/lirc0
- mkdir /root/.mythtv
- ln -s /etc/lircrc /root/.mythtv/lircrc
+ #special case for special remote
+ echo "Starting with support for $Remotype"
+ if [ x$Remotetype = "dvico" ]
+ then
+ /usr/sbin/lircd -d /dev/usb/hiddev0
+ else
+ /usr/sbin/lircd -d /dev/lirc0
+ fi
+ [ -e /root/.mythtv ] || mkdir /root/.mythtv 2>/dev/null
+ ln -s /etc/lircrc /root/.mythtv/lircrc 2>/dev/null
fi
}
diff --git a/abs/core-testing/LinHES-config/install_proxy.sh b/abs/core-testing/LinHES-config/install_proxy.sh
index bc89a1d..57258da 100755
--- a/abs/core-testing/LinHES-config/install_proxy.sh
+++ b/abs/core-testing/LinHES-config/install_proxy.sh
@@ -168,7 +168,7 @@ then
rm -f
$1
fi
-for i in bin boot etc home lib opt root sbin usr var
+for i in bin boot etc home lib opt root sbin usr var data
do
echo $i >> $1
done
@@ -206,7 +206,7 @@ function upgrade () {
$run copy_it $disk $SQUASHLIST
#copy back ssh keys
- cp -rp /data/var/cache/pacman/pkg/* /new_boot/data/var/cache/pacman/pkg/
+# cp -rp /data/var/cache/pacman/pkg/* /new_boot/data/var/cache/pacman/pkg/
cp -fp /new_boot/etc.old/ssh/*.pub /new_boot/etc/ssh/
cp -fp /new_boot/etc.old/ssh/*.key /new_boot/etc/ssh/
cp -fp /new_boot/etc.old/ssh/*key /new_boot/etc/ssh/
@@ -225,11 +225,15 @@ function upgrade () {
fi
$run fstab_fix_it $disk UPGRADE
- echo "Writing boot sector" > /tmp/.install_state
+ #this is here to copy in the systemconfig file as soon as possible.
+ cp -f /etc/systemconfig "$mountpoint"/etc
+
+ echo "Writing boot sector" > /tmp/.install_state
progress 99
sleep 1
$run grub_it $disk
+
echo "Configuring system" > /tmp/.install_state
progress
sleep 1
@@ -264,20 +268,40 @@ function upgrade () {
chroot "$mountpoint" $MV_ROOT/bin/systemconfig.sh misc,hostype,network,advanced,this_is_install
#wrap this in a network check_network, no need to update the db if the import worked.
-##### do I need to start mysql?
+ ##### do I need to start mysql?
/etc/rc.d/mysqld stop
- chroot "$mountpoint" "$MV_ROOT/bin/restore_km_db_chroot.sh" > /tmp/chrootdb_km.out
+ if [ -f /new_boot/myth/backup/mythconverg.sql.gz ]
+ then
+ echo "--------------------------------"
+ echo "Restoring database"
+ echo "--------------------------------"
+ chroot "$mountpoint" "$MV_ROOT/bin/restore_km_db_chroot.sh" > /tmp/chrootdb_km.out
+ else
+ echo "--------------------------------"
+ echo "Couldn't find backup file, installing new database"
+ echo "--------------------------------"
+ touch /tmp/.upgrade_db_failed
+ chroot "$mountpoint" "$MV_ROOT/bin/install_db_chroot.sh" > /tmp/chrootdb.out
+ fi
+
+
if [ -f /tmp/etc/KnoppMyth-version ]
then
chroot "$mountpoint" $MV_ROOT/bin/restore_default_settings.sh -c restore -t hostsettings
+ #change permissions of /myth (only needed on km->linhes)
+ chown -R mythtv:mythtv $mountpoint/myth
+ chown -R root:root $mountpoint/myth/backup
else
chroot "$mountpoint" $MV_ROOT/bin/restore_default_settings.sh -c restore -t syssettings
fi
#
- #Run second time
+ #Run second time
chroot "$mountpoint" $MV_ROOT/bin/systemconfig.sh misc,hostype,network,advanced,this_is_install
chroot "$mountpoint" $MV_ROOT/bin/systemconfig.sh advanced,this_is_install
apply_new_auth
+
+
+
umount "$mountpoint/dev"
umount "$mountpoint/proc"
@@ -480,7 +504,12 @@ echo "-----------------------------------------------------------------------3--
* )
- state=`cat /tmp/.install_state`
+ if [ -f /tmp/.install_state ]
+ then
+ state=`cat /tmp/.install_state`
+ else
+ state=" "
+ fi
if [ x"${state}" = "xConfiguring system" ]
then
progress ""
diff --git a/abs/core-testing/LinHES-config/restore_km_db_chroot.sh b/abs/core-testing/LinHES-config/restore_km_db_chroot.sh
index 35e8fbd..17ad113 100644
--- a/abs/core-testing/LinHES-config/restore_km_db_chroot.sh
+++ b/abs/core-testing/LinHES-config/restore_km_db_chroot.sh
@@ -29,12 +29,19 @@ if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ]
#load database
pacman --noconfirm -R mythdb-initial
pacman --noconfirm -S mythdb-initial
- echo "restoring old database"
- gunzip -c /myth/backup/mythconverg.sql.gz > /myth/backup/mythconverg.sql
- mysql mythconverg < /myth/backup/mythconverg.sql
+
+ if [ -f /myth/backup/mythconverg.sql.gz ]
+ then
+ echo "restoring old database"
+ gunzip -c /myth/backup/mythconverg.sql.gz > /myth/backup/mythconverg.sql
+ mysql mythconverg < /myth/backup/mythconverg.sql
+
+ else
+ echo "Could not restore old database, mythconverg.sql is missing."
+ touch /tmp/.upgrade_db_failed
+ fi
if [ -d /data/srv/mysql/mythconverg ]
- #if [ -d /var/lib/mysql/mythconverg ]
then
status=0
fi
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh
index a12546a..d84c0dc 100755
--- a/abs/core-testing/LinHES-config/systemconfig.sh
+++ b/abs/core-testing/LinHES-config/systemconfig.sh
@@ -204,6 +204,24 @@ function setupremote {
chmod 755 /etc/lircrc
daemon_add="lircd $daemon_add"
sv hup lircd
+
+ if [ ! -e /home/mythtv/.mythtv/lircrc ]
+ then
+ if [ ! -d /home/mythtv/.mythtv ]
+ then
+ mkdir /home/mythtv/.mythtv
+ chown mythtv:mythtv /home/mythtv/.mythtv
+ fi
+
+ ln -s /etc/lircrc /home/mythtv/.mythtv/lircrc 2> /dev/null
+ fi
+ if [ ! -e /home/mythtv/.lircrc ]
+ then
+
+ ln -s /etc/lircrc /home/mythtv/.lircrc 2> /dev/null
+ fi
+
+
;;
esac
diff --git a/abs/core-testing/LinHES-config/templates/xorg/xorg.conf.vesa b/abs/core-testing/LinHES-config/templates/xorg/xorg.conf.vesa
new file mode 100755
index 0000000..c569819
--- /dev/null
+++ b/abs/core-testing/LinHES-config/templates/xorg/xorg.conf.vesa
@@ -0,0 +1,72 @@
+# nvidia-xconfig: X configuration file generated by nvidia-xconfig
+# nvidia-xconfig: version 1.0 (buildmeister@builder3) Tue Aug 1 21:11:12 PDT 2006
+
+Section "ServerLayout"
+ Identifier "Layout0"
+ Screen 0 "Screen0"
+ InputDevice "Keyboard0" "CoreKeyboard"
+ InputDevice "Mouse0" "CorePointer"
+EndSection
+
+Section "Files"
+ RgbPath "/usr/X11R6/lib/X11/rgb"
+EndSection
+
+Section "Module"
+ Load "dbe"
+ Load "extmod"
+ Load "type1"
+ Load "freetype"
+
+EndSection
+
+Section "InputDevice"
+ # generated from default
+ Identifier "Mouse0"
+ Driver "mouse"
+ Option "Protocol" "auto"
+ Option "Device" "/dev/psaux"
+ Option "Emulate3Buttons" "no"
+ Option "ZAxisMapping" "4 5"
+EndSection
+
+Section "InputDevice"
+ # generated from default
+ Identifier "Keyboard0"
+ Driver "keyboard"
+EndSection
+
+Section "Monitor"
+ Identifier "Monitor0"
+ VendorName "Unknown"
+ ModelName "Unknown"
+ HorizSync 30.0 - 110.0
+ VertRefresh 50.0 - 150.0
+ Option "DPMS" "false"
+ Modeline "1280x720" 74.25 1280 1316 1452 1644 720 720 723 751 -hsync +vsync
+ Modeline "1280x720_60.00" 74.25 1280 1352 1432 1648 720 725 730 750 -hsync -vsync
+ ModeLine "848x480" 34.0 848 880 1016 1072 480 494 495 527 -hsync -vsync
+ Modeline "800x600" 38.34 800 832 928 1024 600 604 608 624 -HSync -VSync
+ ModeLine "NTSC-DVD-72p" 32.432 720 736 800 858 480 484 492 525
+EndSection
+
+Section "Device"
+ Identifier "Device0"
+ Driver "vesa"
+ VendorName "Generic Corporation"
+ Option "DPI" "100 x 100"
+
+
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Device0"
+ Monitor "Monitor0"
+ DefaultDepth 24
+ SubSection "Display"
+ Depth 24
+ Modes "1280x720"
+ EndSubSection
+EndSection
+
diff --git a/abs/core-testing/LinHES-config/timezone.bin b/abs/core-testing/LinHES-config/timezone.bin
index a11d65a..cff931a 100755
--- a/abs/core-testing/LinHES-config/timezone.bin
+++ b/abs/core-testing/LinHES-config/timezone.bin
Binary files differ
diff --git a/abs/core-testing/LinHES-config/xconfig.sh b/abs/core-testing/LinHES-config/xconfig.sh
index 42603d6..4984dc5 100755
--- a/abs/core-testing/LinHES-config/xconfig.sh
+++ b/abs/core-testing/LinHES-config/xconfig.sh
@@ -4,10 +4,17 @@ BASE=""
#TEMPLATES="/usr/share/templates"
function Xvalues {
- VGACARDTYPE=`lspci|grep -i vga|sort -r|head -n 1| cut -d: -f3|cut -d" " -f 2`
+ CMDLINE=$(cat /proc/cmdline)
+ echo $CMDLINE |grep -q forceXvesa
+ if [ $? = 0 ]
+ then
+ VGACARDTYPE=vesa
+ else
+ VGACARDTYPE=`lspci|grep -i vga|sort -r|head -n 1| cut -d: -f3|cut -d" " -f 2`
+ fi
echo $VGACARDTYPE
currentmode=`cat $BASE/etc/X11/xorg.conf |grep Modes|awk -Fs ' { print $2 } '`
- }
+}
function presetupX {
if [ x$XUseAdvanced = x1 ]
@@ -192,6 +199,9 @@ function setupX {
fi
;;
+ vesa) sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" $TEMPLATES/xorg/xorg.conf.vesa > $XORG_CONF
+
+
*) #XCONF=`hwd -x |grep etc`
XCONF=`hwd -x |grep etc|tr -d [:cntrl:]|cut -d\/ -f 2-`