diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 4641025..540e154 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -311,15 +311,17 @@ kdump_install_net() { default_dump_target_install_conf() { local _target _fstype - local _s _t local _mntpoint - local _path _save_path + local _save_path is_user_configured_dump_target && return _save_path=$(get_option_value "path") [ -z "$_save_path" ] && _save_path=$DEFAULT_PATH + # strip the duplicated "/" + _save_path=$(echo $_save_path | tr -s /) + _mntpoint=$(get_mntpoint_from_path $_save_path) _target=$(get_target_from_path $_save_path) if [ "$_mntpoint" != "/" ]; then @@ -334,13 +336,12 @@ default_dump_target_install_conf() echo "$_fstype $_target" >> ${initdir}/tmp/$$-kdump.conf - _path=${_save_path##"$_mntpoint"} + _save_path=${_save_path##"$_mntpoint"} #erase the old path line, then insert the parsed path sed -i "/^path/d" ${initdir}/tmp/$$-kdump.conf - echo "path $_path" >> ${initdir}/tmp/$$-kdump.conf + echo "path $_save_path" >> ${initdir}/tmp/$$-kdump.conf fi - } #install kdump.conf and what user specifies in kdump.conf diff --git a/mkdumprd b/mkdumprd index 4d251ba..7c572a7 100644 --- a/mkdumprd +++ b/mkdumprd @@ -13,6 +13,9 @@ conf_file="/etc/kdump.conf" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH +# strip the duplicated "/" +SAVE_PATH=$(echo $SAVE_PATH | tr -s /) + extra_modules="" dracut_args=("--hostonly" "-o" "plymouth dash resume") OVERRIDE_RESETTABLE=0