From 4e9ee2bbdc8a6f245031d97caa9fd34e4fff72de Mon Sep 17 00:00:00 2001 From: immarvin Date: Sun, 24 Aug 2014 22:30:06 -0700 Subject: [PATCH] add kdump support for redhat7 stateless --- xCAT-server/lib/xcat/plugins/packimage.pm | 9 +++++++++ xCAT/postscripts/enablekdump | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index 2480c00d8..79e231270 100644 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -246,6 +246,13 @@ sub process_request { } } + #restore the install.netboot of xcat dracut module + if(-e "$rootimg_dir/usr/lib/dracut/modules.d/97xcat/install"){ + xCAT::Utils->runcmd("mv $rootimg_dir/usr/lib/dracut/modules.d/97xcat/install $rootimg_dir/.statebackup/install", 0, 1); + } + xCAT::Utils->runcmd("cp /opt/xcat/share/xcat/netboot/rh/dracut_033/install.netboot $rootimg_dir/usr/lib/dracut/modules.d/97xcat/install", 0, 1); + + my $xcat_packimg_tmpfile = "/tmp/xcat_packimg.$$"; my $excludestr = "find . -xdev "; my $includestr; @@ -439,6 +446,8 @@ sub process_request { xCAT::Utils->runcmd("mv $rootimg_dir/.statebackup$filename $rootimg_dir$filename", 0, 1); } } + + xCAT::Utils->runcmd("mv $rootimg_dir/.statebackup/install $rootimg_dir/usr/lib/dracut/modules.d/97xcat/install", 0, 1); xCAT::Utils->runcmd("mv $rootimg_dir/.statebackup/statelite $rootimg_dir/etc/init.d/statelite", 0, 1); xCAT::Utils->runcmd("rm -rf $rootimg_dir/.statebackup", 0, 1); } diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump index 2ba1eebe9..1a17d2e51 100755 --- a/xCAT/postscripts/enablekdump +++ b/xCAT/postscripts/enablekdump @@ -218,8 +218,10 @@ EOF [ -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 + sed -i 's/KDUMP_COMMANDLINE_APPEND="/KDUMP_COMMANDLINE_APPEND="nonodestatus /' /etc/sysconfig/kdump + [ -f /etc/dracut.conf ] && mv /etc/dracut.conf /tmp/dracut.conf restartservice kdump + [ -f /tmp/dracut.conf ] && mv /tmp/dracut.conf /etc/dracut.conf 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