Author: glen
Date: Mon Jun 29 00:17:40 2009
New Revision: 10398

Modified:
   rc-scripts/trunk/rc.d/rc.shutdown
Log:
- invoke kexec only if image loaded

Modified: rc-scripts/trunk/rc.d/rc.shutdown
==============================================================================
--- rc-scripts/trunk/rc.d/rc.shutdown   (original)
+++ rc-scripts/trunk/rc.d/rc.shutdown   Mon Jun 29 00:17:40 2009
@@ -184,6 +184,10 @@
        if [ -f /fastboot ]; then
                show "On the next boot fsck will be skipped."; ok
        fi
-       [ -x /sbin/kexec ] && /sbin/kexec -e
+
+       if [ -x /sbin/kexec ] && [ "`cat /sys/kernel/kexec_loaded 2>/dev/null`" 
= "1" ]; then
+               /sbin/kexec -e
+       fi
+
        [ "$previous" != "unknown" ] && eval reboot -d -f
 fi
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to