summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/linhes-live
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2008-12-11 01:37:12 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2008-12-11 01:37:12 (GMT)
commit54e39512d743caf5afe2f587536135c450ea4fcf (patch)
tree22e7ba4ba242782064d36d7a3828b01800436d38 /abs/core-testing/linhes-live
parent8417e5e3b118ed9e12563a3d4fceeb38b9e73d4f (diff)
parent42129857874c470c65d3b1dcb4bf42945a98dcfa (diff)
downloadlinhes_pkgbuild-54e39512d743caf5afe2f587536135c450ea4fcf.zip
linhes_pkgbuild-54e39512d743caf5afe2f587536135c450ea4fcf.tar.gz
linhes_pkgbuild-54e39512d743caf5afe2f587536135c450ea4fcf.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Conflicts: abs/core-testing/LinHES-config/LinHES-release
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-shutdown46
-rwxr-xr-xabs/core-testing/linhes-live/etc/rc.shutdown-live2
3 files changed, 41 insertions, 9 deletions
diff --git a/abs/core-testing/linhes-live/PKGBUILD b/abs/core-testing/linhes-live/PKGBUILD
index 2052781..f718e22 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=12
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..6e12d22 100644
--- a/abs/core-testing/linhes-live/etc/live-shutdown
+++ b/abs/core-testing/linhes-live/etc/live-shutdown
@@ -37,17 +37,49 @@ 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.
#
+seq --help >/dev/null 2>&1
eject --help >/dev/null 2>&1
halt --help >/dev/null 2>&1
poweroff --help >/dev/null 2>&1
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