2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #6189 from neo954/rhels8-kdump

Put the dracut_args --omit back into /etc/kdump.conf
This commit is contained in:
yangsong 2019-03-28 17:34:13 +08:00 committed by GitHub
commit 8a0ae6a41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -57,11 +57,11 @@ The kdump will create a new initrd which used in the dumping stage. The ``/tmp``
* **[RHELS]** ::
tmpfs /var/tmp tmpfs defaults,size=200m 0 2
tmpfs /var/tmp tmpfs defaults,size=500m 0 2
* **[SLES11]** ::
tmpfs /tmp tmpfs defaults,size=200m 0 2
tmpfs /tmp tmpfs defaults,size=500m 0 2
* **[Ubuntu]** ::

View File

@ -246,10 +246,8 @@ EOF
echo "nfs $KDIP:$KDPATH" > /etc/kdump.conf
echo "default shell" >> /etc/kdump.conf
if (pmatch $OSVER "rhel7*") || (pmatch $OSVER "rhels7*");then
#strip "xcat" out of the initramfs for kdump
echo "dracut_args --omit \"xcat\"" >> /etc/kdump.conf
fi
#strip "xcat" out of the initramfs for kdump
echo "dracut_args --omit \"xcat\"" >> /etc/kdump.conf
#strip the unnecessary kernel options from /proc/cmdline
#the modified "cmdline" will be used as the kernel options
#for kdump initramfs; otherwise, the "service kdump restart" will fail
@ -262,7 +260,9 @@ EOF
fi
done
sed -i "s#^[\t ]*KDUMP_COMMANDLINE=\"#KDUMP_COMMANDLINE=\"$kdumpcmdline#" /etc/sysconfig/kdump
sed -i "s#^[\t ]*KDUMP_COMMANDLINE_APPEND=\"#KDUMP_COMMANDLINE_APPEND=\"root=nfs:$KDIP:$KDPATH #" /etc/sysconfig/kdump
if (pmatch $OSVER "rhel7*") || (pmatch $OSVER "rhels7*"); then
sed -i "s#^[\t ]*KDUMP_COMMANDLINE_APPEND=\"#KDUMP_COMMANDLINE_APPEND=\"root=nfs:$KDIP:$KDPATH #" /etc/sysconfig/kdump
fi
[ -f /etc/dracut.conf ] && mv /etc/dracut.conf /tmp/dracut.conf
restartservice kdump
[ -f /tmp/dracut.conf ] && mv /tmp/dracut.conf /etc/dracut.conf