move path/core_collector/default parsing code to initrd.
This commit is contained in:
parent
4a7c912848
commit
be4b40969b
@ -4,5 +4,7 @@ inst "/bin/date" "/bin/date"
|
|||||||
inst "/bin/sync" "/bin/sync"
|
inst "/bin/sync" "/bin/sync"
|
||||||
inst "/usr/bin/reboot" "/bin/reboot"
|
inst "/usr/bin/reboot" "/bin/reboot"
|
||||||
inst "/sbin/makedumpfile" "/sbin/makedumpfile"
|
inst "/sbin/makedumpfile" "/sbin/makedumpfile"
|
||||||
|
inst "/etc/kdump.conf" "/etc/kdump.conf"
|
||||||
|
inst "$moddir/kdump-lib.sh" "/lib/kdump-lib.sh"
|
||||||
inst_hook pre-pivot 01 "$moddir/kdump_localfs.sh"
|
inst_hook pre-pivot 01 "$moddir/kdump_localfs.sh"
|
||||||
|
|
||||||
|
30
kdump_dracut_modules/99kdumpbase/kdump-lib.sh
Executable file
30
kdump_dracut_modules/99kdumpbase/kdump-lib.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
KDUMP_PATH="/var/crash"
|
||||||
|
CORE_COLLECTOR="makedumpfile -d 31 -c"
|
||||||
|
|
||||||
|
read_kdump_conf()
|
||||||
|
{
|
||||||
|
local conf_file="/etc/kdump.conf"
|
||||||
|
if [ -f "$conf_file" ]; then
|
||||||
|
while read config_opt config_val;
|
||||||
|
do
|
||||||
|
case "$config_opt" in
|
||||||
|
path)
|
||||||
|
KDUMP_PATH="$config_val"
|
||||||
|
;;
|
||||||
|
core_collector)
|
||||||
|
CORE_COLLECTOR="$config_val"
|
||||||
|
;;
|
||||||
|
default)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < $conf_file
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_default_action()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
@ -1,13 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/kdump-lib.sh
|
||||||
|
read_kdump_conf
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# We have the root file system mounted under $NEWROOT, so copy
|
# We have the root file system mounted under $NEWROOT, so copy
|
||||||
# the vmcore there and call it a day
|
# the vmcore there and call it a day
|
||||||
#
|
#
|
||||||
DATEDIR=`date +%d.%m.%y-%T`
|
DATEDIR=`date +%d.%m.%y-%T`
|
||||||
|
|
||||||
mount -o remount,rw $NEWROOT/
|
mount -o remount,rw $NEWROOT/
|
||||||
mkdir -p $NEWROOT/var/crash/$DATEDIR
|
mkdir -p $NEWROOT/$KDUMP_PATH/$DATEDIR
|
||||||
cp /proc/vmcore $NEWROOT/var/crash/$DATEDIR/vmcore
|
$CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$DATEDIR/vmcore
|
||||||
sync
|
sync
|
||||||
|
|
||||||
# Once the copy is done, just reboot the system
|
# Once the copy is done, just reboot the system
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: kexec-tools
|
Name: kexec-tools
|
||||||
Version: 2.0.2
|
Version: 2.0.2
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Summary: The kexec/kdump userspace component.
|
Summary: The kexec/kdump userspace component.
|
||||||
@ -281,6 +281,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-8
|
||||||
|
- Move path/core_collector/default parsing code to initrd.
|
||||||
|
|
||||||
* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-7
|
* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-7
|
||||||
- Remove obsolete code in kdumpctl.
|
- Remove obsolete code in kdumpctl.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user