add kdump support for redhat7

This commit is contained in:
immarvin 2014-08-24 07:54:02 -07:00
parent f280d931ed
commit 0f7b27e3e3

View File

@ -213,7 +213,14 @@ EOF
mv ${oldremount}.bak $oldremount
fi
else
if (pmatch $OSVER "fedora*") || (pmatch $OSVER "rhel6*") || (pmatch $OSVER "rhels6*") || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ];then
if (pmatch $OSVER "rhel7*") || (pmatch $OSVER "rhels7*");then
/bin/mount -o nolock $KDIP:$KDPATH $MOUNTPATH
[ -d $MOUNTPATH/var/crash ] || mkdir -p $MOUNTPATH/var/crash
echo "nfs $KDIP:$KDPATH" > /etc/kdump.conf
echo "default shell" >> /etc/kdump.conf
sed -i 's/KDUMP_COMMANDLINE_APPEND="/KDUMP_COMMANDLINE_APPEND="nonodestatus /' /etc/sysconfig/kdump
restartservice kdump
elif (pmatch $OSVER "fedora*") || (pmatch $OSVER "rhel6*") || (pmatch $OSVER "rhels6*") || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ];then
/bin/mount -o nolock $KDIP:$KDPATH $MOUNTPATH
echo "net $KDIP:$KDPATH" > /etc/kdump.conf
echo "link_delay 180" >> /etc/kdump.conf