From 44c8a87f912e5c79a303fb611eb5915a3cee039c Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 25 May 2012 07:10:40 +0000 Subject: [PATCH] support kdump on p7 ih with static ip git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12938 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/enablekdump | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump index 16f1f592c..42689b4d4 100755 --- a/xCAT/postscripts/enablekdump +++ b/xCAT/postscripts/enablekdump @@ -63,12 +63,14 @@ for i in `cat /proc/cmdline`; do KEY=`echo $i | awk -F= '{print $1}'` if [ "$KEY" = "dump" ]; then DUMP=`echo $i |awk -F= '{print $2}'` + if [ ! -z "$XCAT" ]; then + break + fi elif [ "$KEY" = "XCAT" ]; then XCAT=`echo $i |awk -F= '{print $2}'` - elif [ "$KEY" = "fadump" ]; then - FADUMP=`echo $i |awk -F= '{print $2}'` - elif [ "$KEY" = "fadump_target" ]; then - DUMP=`echo $i |awk -F= '{print $2}'` + if [ ! -z "$DUMP" ]; then + break + fi fi done @@ -101,13 +103,19 @@ if [ ! -z "$DUMP" ]; then KDPATH=${KDPATH//\//\\\/} KDPATH="nfs:\/\/${KDIP}${KDPATH}" sed -i "s/^KDUMP_SAVEDIR=.*$/KDUMP_SAVEDIR=\"${KDPATH}\"/" /etc/sysconfig/kdump + sed -i "s/^KDUMP_COPY_KERNEL=.*$/KDUMP_COPY_KERNEL=no/" /etc/sysconfig/kdump + #change the mount and remount shell scripts' name, workaround for kdump on stateless node + oldmount=`ls /lib/mkinitrd/boot/*-mount.sh` + oldremount=`ls /lib/mkinitrd/boot/*-remount.sh` + mv $oldmount ${oldmount}.bak + mv $oldremount ${oldremount}.bak /etc/init.d/boot.kdump restart + mv ${oldmount}.bak $oldmount + mv ${oldremount}.bak $oldremount else if (pmatch $OSVER "fedora*") || (pmatch $OSVER "rhel6*") || (pmatch $OSVER "rhels6*") || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ];then echo "net $KDIP:$KDPATH" > /etc/kdump.conf - if [ ! -z $FADUMP ]; then - /bin/umount $MOUNTPATH - fi + echo "link_delay 180" >> /etc/kdump.conf /etc/init.d/kdump restart fi fi