Fix add_dracut_arg in mkdumprd

This commit is contained in:
Cong Wang 2012-01-10 22:34:47 +08:00
parent 113404857a
commit a0f1142b60
2 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,6 @@
Name: kexec-tools Name: kexec-tools
Version: 2.0.2 Version: 2.0.2
Release: 31%{?dist} Release: 32%{?dist}
License: GPLv2 License: GPLv2
Group: Applications/System Group: Applications/System
Summary: The kexec/kdump userspace component. Summary: The kexec/kdump userspace component.
@ -297,6 +297,9 @@ done
%changelog %changelog
* Tue Jan 10 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-32
- Fix add_dracut_arg in mkdumprd.
* Tue Jan 10 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-31 * Tue Jan 10 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-31
- Update kdump dracut module with the latest dracut kdump branch. - Update kdump dracut module with the latest dracut kdump branch.

View File

@ -10,7 +10,7 @@ export IN_KDUMP=1
conf_file="/etc/kdump.conf" conf_file="/etc/kdump.conf"
extra_modules="" extra_modules=""
dracut_args=("-m" "kdumpbase" "--add" "dash" "--add" "fstab-sys" "-c" "/dev/null") dracut_args=("-m" "kdumpbase" "--add" "dash" "--add" "fstab-sys" "-c" "/dev/null" "-I" "/sbin/makedumpfile")
add_dracut_arg() { add_dracut_arg() {
while [ $# -gt 0 ]; while [ $# -gt 0 ];
@ -99,10 +99,10 @@ if [ -n "$conf_file" ]; then
fi fi
;; ;;
core_collector) core_collector)
add_dracut_arg "-I ${config_val% *}" add_dracut_arg "-I" "${config_val% *}"
;; ;;
extra_bins) extra_bins)
add_dracut_arg "-I $config_val" add_dracut_arg "-I" "$config_val"
;; ;;
*) *)
if [ -n $(echo $config_opt | grep "^#.*$") ] if [ -n $(echo $config_opt | grep "^#.*$") ]
@ -116,7 +116,7 @@ fi
if [ -n "$extra_modules" ] if [ -n "$extra_modules" ]
then then
add_dracut_arg "--add-drivers $extra_modules" add_dracut_arg "--add-drivers" "$extra_modules"
fi fi
dracut "${dracut_args[@]}" -M "$@" dracut "${dracut_args[@]}" -M "$@"