kadischi/rc readonly-halt,1.3,1.4

Jasper O'neal Hartline (autopsy) fedora-extras-commits at redhat.com
Wed Jul 12 01:22:26 UTC 2006


Author: autopsy

Update of /cvs/devel/kadischi/rc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1317/kadischi/rc

Modified Files:
	readonly-halt 
Log Message:
Drop i18n.h and eject_live_cd.c mostly od eject.c


Index: readonly-halt
===================================================================
RCS file: /cvs/devel/kadischi/rc/readonly-halt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- readonly-halt	10 Jul 2006 11:49:57 -0000	1.3
+++ readonly-halt	12 Jul 2006 01:22:24 -0000	1.4
@@ -42,14 +42,31 @@
 cp /etc/mtab /livecd/ramfs/mtab
 ln -f -s /livecd/ramfs/mtab /etc/mtab
 
+# See which runlevel we are in here.
+RUNLEVEL=$(/sbin/runlevel | /bin/cut -d " " -f2)
+
 ## Eject LiveCD
 ## 
+echo "0" >/proc/sys/kernel/printk 
 mount -t ext2 /dev/ram0 /initrd
 cp /etc/mtab /initrd/etc
 cd /
 pivot_root /initrd /initrd/sysroot
 mount -t proc none /proc
+mount -t sysfs none /sys
 mount -t tmpfs none /dev
-echo "Going to halt the system.."
-echo "You may remove any LiveCD media from the drive"
-/bin/eject-live-cd
+/bin/eject-live-cd >/dev/null 2>&1
+/bin/eject /tmp/cdrom
+
+if [ "$RUNLEVEL" -eq "6" ]; then
+     clear
+     echo "Going to reboot the system.."
+     echo "You may remove any LiveCD media from the drives"
+     reboot -d 10
+fi
+if [ "$RUNLEVEL" -eq "0" ]; then
+    clear
+    echo "Going to halt the system.."
+    echo "You may remove any LiveCD media from the drives"
+    halt
+fi




More information about the fedora-extras-commits mailing list