Updating dracut modules
This commit is contained in:
parent
54d952b315
commit
b9b1d10954
@ -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"
|
||||
|
@ -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
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
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
|
||||
|
@ -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 <nhorman@redhat.com> - 2.0.0-24
|
||||
- update kdump adv conf init script & dracut module
|
||||
|
||||
* Wed Jul 29 2009 Neil Horman <nhorman@redhat.com> - 2.0,0-23
|
||||
- Remove mkdumprd2 and start replacement with dracut
|
||||
|
||||
|
2
sources
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user