mkdumprd: parse default action
This commit is contained in:
parent
aaf6e91205
commit
a1edbf7d6c
@ -2,6 +2,7 @@
|
||||
|
||||
KDUMP_PATH="/var/crash"
|
||||
CORE_COLLECTOR="makedumpfile -d 31 -c"
|
||||
DEFAULT_ACTION="reboot -f"
|
||||
|
||||
read_kdump_conf()
|
||||
{
|
||||
@ -17,7 +18,21 @@ read_kdump_conf()
|
||||
CORE_COLLECTOR="$config_val"
|
||||
;;
|
||||
default)
|
||||
;;
|
||||
case $config_val in
|
||||
shell)
|
||||
DEFAULT_ACTION="/bin/sh"
|
||||
;;
|
||||
reboot)
|
||||
DEFAULT_ACTION="reboot -f"
|
||||
;;
|
||||
halt)
|
||||
DEFAULT_ACTION="halt -f"
|
||||
;;
|
||||
poweroff)
|
||||
DEFAULT_ACTION="poweroff -f"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done < $conf_file
|
||||
fi
|
||||
@ -25,6 +40,6 @@ read_kdump_conf()
|
||||
|
||||
do_default_action()
|
||||
{
|
||||
return
|
||||
$DEFAULT_ACTION
|
||||
}
|
||||
|
||||
|
@ -14,5 +14,5 @@ mkdir -p $NEWROOT/$KDUMP_PATH/$DATEDIR
|
||||
$CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$DATEDIR/vmcore
|
||||
sync
|
||||
|
||||
# Once the copy is done, just reboot the system
|
||||
reboot -f
|
||||
do_default_action
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: kexec-tools
|
||||
Version: 2.0.2
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
License: GPLv2
|
||||
Group: Applications/System
|
||||
Summary: The kexec/kdump userspace component.
|
||||
@ -281,6 +281,9 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jul 26 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-9
|
||||
- Parse default action.
|
||||
|
||||
* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-8
|
||||
- Move path/core_collector/default parsing code to initrd.
|
||||
|
||||
|
1
sources
1
sources
@ -5,3 +5,4 @@ e3a813bd6d7dace903a05c1296e20d57 makedumpfile-1.3.5.tar.gz
|
||||
8e359dd03731b93a2082bd37cc2a4a4c kexec-tools-2.0.2.tar.bz2
|
||||
d872bdde29eb036cd59e7b71c148fca6 dracut-files.tbz2
|
||||
729603e26a37b91aafd52966300693f8 dracut-files.tbz2
|
||||
1c866f72a724807d4dc23fa8571b8e08 dracut-files.tbz2
|
||||
|
Loading…
Reference in New Issue
Block a user