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