From ae7dce0148c2b2ab4d477a9973da59461755d4e8 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Thu, 31 Aug 2006 13:23:33 +0000 Subject: [PATCH] updating mkdumprd --- kexec-tools.spec | 6 +++++- mkdumprd | 15 +++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/kexec-tools.spec b/kexec-tools.spec index 1cbeefd..ba3abe9 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -1,6 +1,6 @@ Name: kexec-tools Version: 1.101 -Release: 50%{?dist} +Release: 51%{?dist} License: GPL Group: Applications/System Summary: The kexec/kdump userspace component. @@ -159,6 +159,10 @@ exit 0 %doc TODO %changelog +* Thu Aug 31 2006 Neil Horman - 1.101-51%{dist} +- update mkdumprd to properly do scp and nfs based dumps +- update docs in kdump.conf to reflect new ifc parameter + * Mon Aug 28 2006 Neil Horman - 1.101-50%{dist} - updating to build without need for asm/page.h on x86_64 diff --git a/mkdumprd b/mkdumprd index 1da23f2..97f24f0 100644 --- a/mkdumprd +++ b/mkdumprd @@ -1076,7 +1076,11 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then #ssh, scp require libraries that aren't found with ldd lib=/lib && [ -d "/lib64" ] && lib=/lib64 k_extras="/$lib/libnss_compat.so.2 /$lib/libnss_files.so.2" - + bin="$bin /usr/bin/scp /usr/bin/ssh /bin/dd /bin/cp" + + #build an /etc/passwd for scp to work properly + grep "^root" /etc/passwd > $MNTIMAGE/etc/passwd + # bring up the network emit "echo Bring up network" emit $network @@ -1113,7 +1117,8 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then #setup nfs case mkdir -p $MNTIMAGE/mnt emit "mount -t nfs -o nolock $rlocation /mnt" - emit "cond kcp --local /proc/vmcore /mnt/var/crash/$lhost-%DATE/vmcore" + emit "dd if=/dev/mem of=/dev/urandom count=1 bs=512 skip=100" + emit "cond kcp --local /proc/vmcore /mnt/var/crash/$lhost-%DATE" emit "cond reboot -h -f" else #SSH path @@ -1135,7 +1140,6 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then #setup ssh case, quick check to see if setup already if [ ! -r $MNTIMAGE/dev/urandom ]; then #only need to do these once - grep "^root" /etc/passwd > $MNTIMAGE/etc/passwd mkdir -p $MNTIMAGE/root cp -a /root/.ssh $MNTIMAGE/root/ cp -a /etc/ssh $MNTIMAGE/etc @@ -1143,9 +1147,8 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then emit "mknod /dev/urandom c 1 9" fi emit "dd if=/dev/mem of=/dev/urandom count=1 bs=512 skip=100" - emit "cond kcp --ssh /proc/vmcore $rlocation:/var/crash/$lhost-%DATE/vmcore" + emit "cond kcp --ssh /proc/vmcore $rlocation:/var/crash/$lhost-%DATE" emit "cond reboot -h -f" - bin="$bin /usr/bin/scp /usr/bin/ssh /bin/dd" fi ;; ifc) @@ -1174,7 +1177,7 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then emit "echo Saving to the local filesystem $location" emit "fsck.$type $location" emit "cond mount -t $type $location /mnt" - emit "cond kcp --local /proc/vmcore /mnt/var/crash/$lhost-%DATE/vmcore" + emit "cond kcp --local /proc/vmcore /mnt/var/crash/$lhost-%DATE" emit "cond umount /mnt" emit "cond reboot -h -f" bin="$bin /sbin/fsck.$type /bin/mount"