summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-live
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/linhes-live
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/linhes-live')
-rw-r--r--abs/core/linhes-live/PKGBUILD4
-rw-r--r--abs/core/linhes-live/etc/live-shutdown66
-rw-r--r--abs/core/linhes-live/etc/live-sysinit19
-rwxr-xr-xabs/core/linhes-live/etc/rc.shutdown-live1
-rwxr-xr-xabs/core/linhes-live/etc/rc.sysinit-live3
-rw-r--r--abs/core/linhes-live/lib/initcpio/hooks/larch15
-rw-r--r--abs/core/linhes-live/lib/initcpio/hooks/larch34
7 files changed, 88 insertions, 14 deletions
diff --git a/abs/core/linhes-live/PKGBUILD b/abs/core/linhes-live/PKGBUILD
index d497fcf..c86e3cc 100644
--- a/abs/core/linhes-live/PKGBUILD
+++ b/abs/core/linhes-live/PKGBUILD
@@ -2,7 +2,7 @@
# 2008.09.25
pkgname=linhes-live
pkgver=5.3.3
-pkgrel=4
+pkgrel=25
pkgdesc="LinHes compulsory components for the Live System."
url="http://KnoppMyth.net"
@@ -28,3 +28,5 @@ build() {
}
# End
+#change hook1 to wait for usb cdroms
+#add extra login to f_remountro for vmware/usb
diff --git a/abs/core/linhes-live/etc/live-shutdown b/abs/core/linhes-live/etc/live-shutdown
index 807ec47..b6a8378 100644
--- a/abs/core/linhes-live/etc/live-shutdown
+++ b/abs/core/linhes-live/etc/live-shutdown
@@ -9,12 +9,12 @@ f_saveclock ()
f_swapoff ()
{
############################# Include session saving functions
- . /opt/linhes-live/session-save/shutdown2
- if [ -f /tmp/checkse ]; then
- . /tmp/checkse
- else
- checkse
- fi
+# . /opt/linhes-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/core/linhes-live/etc/live-sysinit b/abs/core/linhes-live/etc/live-sysinit
index abab4a8..40edad9 100644
--- a/abs/core/linhes-live/etc/live-sysinit
+++ b/abs/core/linhes-live/etc/live-sysinit
@@ -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/core/linhes-live/etc/rc.shutdown-live b/abs/core/linhes-live/etc/rc.shutdown-live
index 7fa97e6..79eae47 100755
--- a/abs/core/linhes-live/etc/rc.shutdown-live
+++ b/abs/core/linhes-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/core/linhes-live/etc/rc.sysinit-live b/abs/core/linhes-live/etc/rc.sysinit-live
index 3f72a50..afdc2ae 100755
--- a/abs/core/linhes-live/etc/rc.sysinit-live
+++ b/abs/core/linhes-live/etc/rc.sysinit-live
@@ -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/core/linhes-live/lib/initcpio/hooks/larch1 b/abs/core/linhes-live/lib/initcpio/hooks/larch1
index e1a3753..88ccc3e 100644
--- a/abs/core/linhes-live/lib/initcpio/hooks/larch1
+++ b/abs/core/linhes-live/lib/initcpio/hooks/larch1
@@ -115,6 +115,11 @@ run_hook ()
test_live_data_dir "${d}" "${cdmount}"
if [ $? -eq 0 ]; then break 2; fi
done
+ msg_ ":: Searching for usb cdroms .."
+ for d in /dev/sr[0-9]*; do
+ test_live_data_dir "${d}" "${cdmount}"
+ if [ $? -eq 0 ]; then break 2; fi
+ done
done
fi
}
diff --git a/abs/core/linhes-live/lib/initcpio/hooks/larch3 b/abs/core/linhes-live/lib/initcpio/hooks/larch3
index 47be81a..b301aa9 100644
--- a/abs/core/linhes-live/lib/initcpio/hooks/larch3
+++ b/abs/core/linhes-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 -