summaryrefslogtreecommitdiffstats
path: root/abs/not_built/core/linhes-live/etc/live-shutdown
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-12-01 18:26:09 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-12-01 18:26:22 (GMT)
commite2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37 (patch)
treebee3fe89f2988dd244e11791755e129aa8c03b14 /abs/not_built/core/linhes-live/etc/live-shutdown
parent8132c218cfc1f1acb1c6d12154e0d4ca075e77f2 (diff)
downloadlinhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.zip
linhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.tar.gz
linhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.tar.bz2
Mass move of uncompiled packages to abs_not_built.
The will sit here for a bit, and then will be removed completely if no one claims them.
Diffstat (limited to 'abs/not_built/core/linhes-live/etc/live-shutdown')
-rw-r--r--abs/not_built/core/linhes-live/etc/live-shutdown90
1 files changed, 90 insertions, 0 deletions
diff --git a/abs/not_built/core/linhes-live/etc/live-shutdown b/abs/not_built/core/linhes-live/etc/live-shutdown
new file mode 100644
index 0000000..b6a8378
--- /dev/null
+++ b/abs/not_built/core/linhes-live/etc/live-shutdown
@@ -0,0 +1,90 @@
+# Functions used by rc.shutdown
+# Modified versions for linhes live systems
+
+f_saveclock ()
+{
+ :
+}
+
+f_swapoff ()
+{
+ ############################# Include session saving functions
+# . /opt/linhes-live/session-save/shutdown2
+# if [ -f /tmp/checkse ]; then
+# . /tmp/checkse
+# else
+# checkse
+# fi
+
+ if [ -n "${saving}" ] && ! session_save; then
+ echo
+ echo "If you know what you are doing, you may be able to recover"
+ echo "something from this unpleasant situation."
+ echo
+ echo "You may use the command line to investigate further ..."
+ echo
+ echo "When finished please enter 'exit', the shutdown process will"
+ echo "then continue."
+ sh -i
+ fi
+
+ #############################
+
+ stat_busy "Deactivating Swap"
+ /sbin/swapoff -a
+ stat_done
+}
+
+f_remountro ()
+{
+ 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