aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Gong <gong.chen@linux.intel.com>2009-09-11 17:11:14 +0800
committerHuang Ying <ying.huang@intel.com>2009-09-16 09:07:14 +0800
commit4c6ce4391365aed337eb75ed8e8e5184c8171f51 (patch)
treedcc8b4400ec8f6758df0693da00c7340a017425f
parent8e1ea882b4ce207ae9c2355a73286ca0c3554578 (diff)
downloadmce-test-4c6ce4391365aed337eb75ed8e8e5184c8171f51.tar.gz
fix kdump name definition
SLE11 change the kdump name from "kdump" to "boot.kdump". So fix it in a usual way. Signed-off-by: Chen Gong <gong.chen@intel.com>
-rwxr-xr-xdrivers/kdump/driver.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/kdump/driver.sh b/drivers/kdump/driver.sh
index f5982ec..b072312 100755
--- a/drivers/kdump/driver.sh
+++ b/drivers/kdump/driver.sh
@@ -63,16 +63,24 @@ EOF
setup_kdump ()
{
echo "Start kdump daemon."
- /etc/init.d/kdump restart
+
+ if [ -f /etc/init.d/kdump ]; then
+ daemon=kdump
+ else
+ #SLE11
+ daemon=boot.kdump
+ fi
+
+ /etc/init.d/"${daemon}" restart
echo "Enable kdump daemon by default."
# Red Hat and SUSE.
if [ -x "/sbin/chkconfig" ]; then
- /sbin/chkconfig kdump on
+ /sbin/chkconfig "${daemon}" on
# Debian and Ubuntu.
elif [ -x "/sbin/update-rc.d" ]; then
- /sbin/update-rc.d kdump defaults
+ /sbin/update-rc.d "${daemon}" defaults
fi
}