From b9b1d109544768f3b133e06589451b880913a268 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Aug 14 2009 13:30:28 +0000 Subject: Updating dracut modules --- diff --git a/kdump_dracut_modules/99kdumpbase/install b/kdump_dracut_modules/99kdumpbase/install index a2448ac..f1e3e63 100755 --- a/kdump_dracut_modules/99kdumpbase/install +++ b/kdump_dracut_modules/99kdumpbase/install @@ -1,3 +1,5 @@ #!/bin/bash rm -f $initdir/init inst "/etc/kdump-adv-conf/init" "/init" +inst "/bin/date" "/bin/date" +inst "/usr/bin/reboot" "bin/reboot" diff --git a/kdump_initscripts/init b/kdump_initscripts/init index 36f1a07..cb6fc6a 100755 --- a/kdump_initscripts/init +++ b/kdump_initscripts/init @@ -174,60 +174,12 @@ while :; do && { flock -s 9 ; emergency_shell "Can't mount root filesystem"; } 9>/.console_lock done -# pre pivot scripts are sourced just before we switch over to the new root. -getarg 'rdbreak=pre-pivot' && emergency_shell "Break pre-pivot" -source_all pre-pivot - -# by the time we get here, the root filesystem should be mounted. -# Try to find init. -for i in "$(getarg init=)" /sbin/init /etc/init /init /bin/sh; do - [ -f "$NEWROOT$i" -a -x "$NEWROOT$i" ] && { INIT="$i"; break; } -done -[ "$INIT" ] || { - echo "Cannot find init!" - echo "Please check to make sure you passed a valid root filesystem!" - emergency_shell -} - -getarg rdbreak && emergency_shell "Break before switch_root" - -HARD="" -while pidof udevd >/dev/null 2>&1; do - for pid in $(pidof udevd); do - kill $HARD $pid >/dev/null 2>&1 - done - HARD="-9" -done - -# Clean up the environment -for i in $(export -p); do - i=${i#declare -x} - i=${i#export} - i=${i%%=*} - [ "$i" = "root" -o "$i" = "PATH" -o "$i" = "HOME" -o "$i" = "TERM" ] || unset $i -done - -initargs="" -initrdargs="$initrdargs console BOOT_IMAGE rdbreak rdinitdebug rdudevinfo rdudevdebug rdnetdebug rdcopystate rdshell" - -for x in "$@"; do - for s in $initrdargs; do - [ "${x%%=*}" = $s ] && continue 2 - done - initargs="$initargs $x" -done - -# Copy state -mkdir /dev/.initramfs/ -if getarg rdcopystate; then - cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1 -else - cp /tmp/net.* /dev/.initramfs/ >/dev/null 2>&1 -fi +# We have the root file system mounted under $NEWROOT, so copy +# the vmcore there and call it a day +# +DATEDIR=`date +%d.%m.%y-%T` +mkdir -p $NEWROOT/var/crash/$DATEDIR +cp /proc/vmcore /var/crash/$DATEDIR/vmcore -exec switch_root "$NEWROOT" "$INIT" $initargs || { - # davej doesn't like initrd bugs - echo "Something went very badly wrong in the initrd. Please " - echo "file a bug against mkinitrd." - emergency_shell -} +# Once the copy is done, just reboot the system +reboot -f diff --git a/kexec-tools.spec b/kexec-tools.spec index a2463d1..dd74641 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -1,6 +1,6 @@ Name: kexec-tools Version: 2.0.0 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv2 Group: Applications/System Summary: The kexec/kdump userspace component. @@ -261,6 +261,9 @@ done %changelog +* Thu Aug 13 2009 Neil Horman - 2.0.0-24 +- update kdump adv conf init script & dracut module + * Wed Jul 29 2009 Neil Horman - 2.0,0-23 - Remove mkdumprd2 and start replacement with dracut diff --git a/sources b/sources index 43a6a25..0b7baae 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ d9f2ecd3c3307905f24130a25816e6cc kexec-tools-2.0.0.tar.bz2 3e802d638dce0080b910f15908c04a24 kexec-tools-po.tar.gz 190f8878aa7e7b63a96fde5d59538eec makedumpfile-1.3.3.tar.gz -925dc7a5121fbb8eab854375d7ea4d1d dracut-files.tbz2 +827939e16fc1af25ecddb0d4ef9e2bb2 dracut-files.tbz2