[Fedora-livecd-list] config/livecd-fedora-base-desktop.ks
Jeremy Katz
katzj at fedoraproject.org
Fri Jun 6 01:50:23 UTC 2008
config/livecd-fedora-base-desktop.ks | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 6cda8976d851523f4f65c6fae05bd9339d5d4e2c
Author: Jeremy Katz <katzj at redhat.com>
Date: Thu Jun 5 16:55:46 2008 -0400
Hack to eject the CD on shutdown to handle #239928
Eject the CD on shutdown from halt.local. This could end up hanging
the shutdown process but we can't really do better without support
for eject in /sbin/halt (#448997)
diff --git a/config/livecd-fedora-base-desktop.ks b/config/livecd-fedora-base-desktop.ks
index 0bafe3b..586c958 100644
--- a/config/livecd-fedora-base-desktop.ks
+++ b/config/livecd-fedora-base-desktop.ks
@@ -192,6 +192,20 @@ touch /media/.hal-mtab
# workaround clock syncing on shutdown that we don't want (#297421)
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
+
+# and hack so that we eject the cd on shutdown if we're using a CD...
+if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
+ cat >> /sbin/halt.local << FOE
+#!/bin/bash
+# we want to eject the cd on halt, but let's also try to avoid
+# io errors due to not being able to get files...
+cat /sbin/halt > /dev/null
+cat /sbin/reboot > /dev/null
+/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
+FOE
+chmod +x /sbin/halt.local
+fi
+
EOF
# bah, hal starts way too late
More information about the Fedora-livecd-list
mailing list