--- /etc/init.d/kexec_original 2008-04-26 13:21:05.000000000 +0800 +++ /etc/init.d/kexec 2008-04-26 13:22:06.000000000 +0800 @@ -49,7 +49,7 @@ ebegin "Loading kernel image ${img} for kexec" if [ -z "${ROOTPART}" ] ; then - ROOTPART="$(sed -n '/^[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /etc/mtab)" + ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /etc/mtab)")" fi if [ -z "${KPARAM}" ] ; then KPARAM="$(sed -e 's/ /\n/g' /proc/cmdline | grep -v -e "^root=" | tr '\n' ' ')" @@ -83,7 +83,7 @@ [ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0 ebegin "Configuring kexec" - if [ "${RC_SOFTLEVEL:-${SOFTLEVEL}}" != "reboot" ]; then + if [ "${RC_SOFTLEVEL:-${SOFTLEVEL:-${RC_RUNLEVEL:-${RUNLEVEL}}}}" != "reboot" ]; then einfo "Not rebooting, so disabling" kexec -u return 0