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
This commit is contained in:
parent
b878818966
commit
44c8a87f91
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user