diff options
author | James Meyer <james.meyer@operamail.com> | 2009-08-21 00:51:35 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-08-21 00:51:35 (GMT) |
commit | 348ed005f1ba2e77ded656fe2209a58197571b2d (patch) | |
tree | 9ea9354c86f0510526a72ba831a9a5656534010d /abs/mv-core/mythvantage-live | |
parent | 9a60dd7921db1ab7a168da96329bad3e9c24725e (diff) | |
download | linhes_pkgbuild-348ed005f1ba2e77ded656fe2209a58197571b2d.zip linhes_pkgbuild-348ed005f1ba2e77ded656fe2209a58197571b2d.tar.gz linhes_pkgbuild-348ed005f1ba2e77ded656fe2209a58197571b2d.tar.bz2 |
mv-core: bring more stuff up to date
Diffstat (limited to 'abs/mv-core/mythvantage-live')
-rw-r--r-- | abs/mv-core/mythvantage-live/PKGBUILD | 2 | ||||
-rw-r--r-- | abs/mv-core/mythvantage-live/etc/live-shutdown | 66 | ||||
-rw-r--r-- | abs/mv-core/mythvantage-live/etc/live-sysinit | 21 | ||||
-rwxr-xr-x | abs/mv-core/mythvantage-live/etc/rc.shutdown-live | 1 | ||||
-rwxr-xr-x | abs/mv-core/mythvantage-live/etc/rc.sysinit-live | 7 | ||||
-rw-r--r-- | abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3 | 4 |
6 files changed, 84 insertions, 17 deletions
diff --git a/abs/mv-core/mythvantage-live/PKGBUILD b/abs/mv-core/mythvantage-live/PKGBUILD index d23d8e7..1039b71 100644 --- a/abs/mv-core/mythvantage-live/PKGBUILD +++ b/abs/mv-core/mythvantage-live/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythvantage-live pkgver=5.3.3 -pkgrel=8 +pkgrel=10 provides="linhes-live" pkgdesc="components for the Live System." diff --git a/abs/mv-core/mythvantage-live/etc/live-shutdown b/abs/mv-core/mythvantage-live/etc/live-shutdown index 99c4c10..75c540d 100644 --- a/abs/mv-core/mythvantage-live/etc/live-shutdown +++ b/abs/mv-core/mythvantage-live/etc/live-shutdown @@ -9,12 +9,12 @@ f_saveclock () f_swapoff () { ############################# Include session saving functions - . /opt/mythvantage-live/session-save/shutdown2 - if [ -f /tmp/checkse ]; then - . /tmp/checkse - else - checkse - fi +# . /opt/mythvantage-live/session-save/shutdown2 +# if [ -f /tmp/checkse ]; then +# . /tmp/checkse +# else +# checkse +# fi if [ -n "${saving}" ] && ! session_save; then echo @@ -37,14 +37,54 @@ f_swapoff () f_remountro () { - if [ -n "${ejectdev}" ]; then - echo "Ejecting live CD" - eject ${ejectdev} - echo "========================================" - echo "It's safe to switch the computer off now" - echo -ne "Press Enter to continue" - read junk + bootdev=`cat /.livesys/bootdevice` + echo "Boot device was $bootdev" + #bootdev=`basename $bootdev` + for i in `ls /dev/cd/*` + do + cdrom=`readlink -f $i` + if [ x$cdrom = x$bootdev ] + then + ejectdev=$cdrom + break + fi + + done + lspci |grep -q VMware + if [ ! $? = 0 ] + then + if [ -n "${ejectdev}" ] + then + echo "Ejecting CD $ejectdev" + eject ${ejectdev} + echo "========================================" + echo "Tray will retract after 10 seconds" + for timer in `seq -w 10 -1 0` + do + #echo -n $timer '\x08' + echo -ne "\t"$timer '\010\010\010\010' + sleep 1 + done + echo + echo "========================================" + eject -t ${ejectdev} + echo + echo "It's safe to switch the computer off now" + #echo -ne "Press Enter to continue" + #read junk + else + echo "Boot device is not a cdrom, no need to eject" + fi + else + echo "VMWARE detected, not ejecting the CD" fi } +#Preloads these commands so we can eject the CD. +# +seq --help >/dev/null 2>&1 +eject --help >/dev/null 2>&1 +halt --help >/dev/null 2>&1 +poweroff --help >/dev/null 2>&1 +reboot --help >/dev/null 2>&1 # End diff --git a/abs/mv-core/mythvantage-live/etc/live-sysinit b/abs/mv-core/mythvantage-live/etc/live-sysinit index 8e2813b..4cf36f2 100644 --- a/abs/mv-core/mythvantage-live/etc/live-sysinit +++ b/abs/mv-core/mythvantage-live/etc/live-sysinit @@ -6,7 +6,7 @@ f_header () cR='\e[31m' cY='\e[1;33m' cN='\e[0m' cW='\e[1;37m' echo " " printsep - printf " ${cR}MythVantage ${cY}Installation${cN}/${cY}Live${cW}. " + printf " ${cR}MythVantage ${cY}Installation${cN}/${cY}Live${cW} CDROM${cN}. " printsep echo " " } @@ -52,3 +52,22 @@ f_swapon () status "Activating Swap" /sbin/swapon -a fi } +f_loadmodules() +{ + CMDLINE=$(cat /proc/cmdline) + echo $CMDLINE | grep -q modules + if [ $? -eq 0 ] + then + TEMPVAR=${CMDLINE#* modules=} + CMDMODULES=${TEMPVAR%% *} + mymod=`echo $CMDMODULES|/bin/sed 's|-|_|g' |/bin/sed 's|,| |g'` + stat_busy "Loading CMD module" + for mod in $mymod + do + /sbin/modprobe $mod + done + stat_done + fi + + +} diff --git a/abs/mv-core/mythvantage-live/etc/rc.shutdown-live b/abs/mv-core/mythvantage-live/etc/rc.shutdown-live index bba263c..58988f3 100755 --- a/abs/mv-core/mythvantage-live/etc/rc.shutdown-live +++ b/abs/mv-core/mythvantage-live/etc/rc.shutdown-live @@ -149,6 +149,7 @@ fi #F Remount / ro f_remountro +#Eject the CD # Power off or reboot if [ "$RUNLEVEL" = "0" ]; then diff --git a/abs/mv-core/mythvantage-live/etc/rc.sysinit-live b/abs/mv-core/mythvantage-live/etc/rc.sysinit-live index 3f72a50..b3b91de 100755 --- a/abs/mv-core/mythvantage-live/etc/rc.sysinit-live +++ b/abs/mv-core/mythvantage-live/etc/rc.sysinit-live @@ -12,7 +12,7 @@ ############################################################### ### These functions have been separated out, so that they can be -### replaced in linhes live systems. +### replaced in mythvantage live systems. f_header () { @@ -98,7 +98,7 @@ f_swapon () ############################################################### -### Override above functions if running linhes live system +### Override above functions if running mythvantage live system [ -f /etc/live-sysinit ] && . /etc/live-sysinit #F Print header @@ -176,6 +176,9 @@ fi # Load modules from the MODULES array defined in rc.conf if ! [ "$load_modules" = "off" ]; then if [ -f /proc/modules ]; then +############Added by jm to load modules from /proc/cmdline + f_loadmodules +############## stat_busy "Loading Modules" for mod in "${MODULES[@]}"; do if [ "$mod" = "${mod#!}" ]; then diff --git a/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3 b/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3 index 47be81a..b301aa9 100644 --- a/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3 +++ b/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3 @@ -96,6 +96,8 @@ run_hook () msg_ ":: Mounting squashed images" /bin/mkdir /tfs/system + #added sleep for 3 seconds, because well i don't know but it seems to fix things + sleep 3 # The klibc mount command doesn't support '-o loop' /bin/losetup /dev/loop0 ${sysSqf} /bin/mount -r -t squashfs /dev/loop0 /tfs/system @@ -107,11 +109,13 @@ run_hook () export LD_LIBRARY_PATH=/tfs/system/lib:/tfs/system/usr/lib /bin/mkdir /tfs/mods + # The klibc mount command doesn't support '-o loop' /bin/losetup /dev/loop1 ${modsSqf} /bin/mount -r -t squashfs /dev/loop1 /tfs/mods # Unpack the overlay + msg_ ":: Initializing writable layer for union (overlay)" /tfs/system/usr/bin/lzop -d < ${overlay} | \ /tfs/system/bin/tar -C /tfs -xf - |