summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/linhes-live
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-12-04 21:19:55 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-12-04 21:19:55 (GMT)
commit46cf7f52515f3c0dd412f94118839082d24fde53 (patch)
treec1f2020377a3f0127a44cd398198458062c20823 /abs/core-testing/linhes-live
parent39b7f8d9aae573403092951a83a08afe206a557b (diff)
downloadlinhes_pkgbuild-46cf7f52515f3c0dd412f94118839082d24fde53.zip
linhes_pkgbuild-46cf7f52515f3c0dd412f94118839082d24fde53.tar.gz
linhes_pkgbuild-46cf7f52515f3c0dd412f94118839082d24fde53.tar.bz2
Don't eject the cd if VMWARE is used or if the boot device is not a CD drive.
Also introduce a 10 second timer before retracting the CD. REF FS#30
Diffstat (limited to 'abs/core-testing/linhes-live')
-rw-r--r--abs/core-testing/linhes-live/PKGBUILD2
-rw-r--r--abs/core-testing/linhes-live/etc/live-shutdown45
-rwxr-xr-xabs/core-testing/linhes-live/etc/rc.shutdown-live2
3 files changed, 40 insertions, 9 deletions
diff --git a/abs/core-testing/linhes-live/PKGBUILD b/abs/core-testing/linhes-live/PKGBUILD
index 2052781..158d141 100644
--- a/abs/core-testing/linhes-live/PKGBUILD
+++ b/abs/core-testing/linhes-live/PKGBUILD
@@ -2,7 +2,7 @@
# 2008.09.25
pkgname=linhes-live
pkgver=5.3.3
-pkgrel=6
+pkgrel=11
pkgdesc="LinHes compulsory components for the Live System."
url="http://KnoppMyth.net"
diff --git a/abs/core-testing/linhes-live/etc/live-shutdown b/abs/core-testing/linhes-live/etc/live-shutdown
index 459d4f2..3df4802 100644
--- a/abs/core-testing/linhes-live/etc/live-shutdown
+++ b/abs/core-testing/linhes-live/etc/live-shutdown
@@ -37,13 +37,44 @@ 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`
+ bootdev=`basename $bootdev`
+ for i in `ls -H /dev/cd/*`
+ do
+ cdrom=`basename $i|cut -d- -f2`
+ if [ x$cdrom = x$bootdev ]
+ then
+ ejectdev=$cdrom
+ fi
+ break
+ done
+ lspci |grep -q VMware
+ if [ ! $? = 0 ]
+ then
+ if [ -n "${ejectdev}" ]
+ then
+ echo "Ejecting CD"
+ 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.
diff --git a/abs/core-testing/linhes-live/etc/rc.shutdown-live b/abs/core-testing/linhes-live/etc/rc.shutdown-live
index 896bae2..79eae47 100755
--- a/abs/core-testing/linhes-live/etc/rc.shutdown-live
+++ b/abs/core-testing/linhes-live/etc/rc.shutdown-live
@@ -150,7 +150,7 @@ fi
#F Remount / ro
f_remountro
#Eject the CD
-eject
+
# Power off or reboot
if [ "$RUNLEVEL" = "0" ]; then
printsep