diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 84dd72e..f38891d 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -226,6 +226,8 @@ read_kdump_conf() # first get the necessary variables while read config_opt config_val; do + # remove inline comments after the end of a directive. + config_val=$(strip_comments $config_val) case "$config_opt" in path) KDUMP_PATH="$config_val" @@ -269,6 +271,8 @@ read_kdump_conf() # rescan for add code for dump target while read config_opt config_val; do + # remove inline comments after the end of a directive. + config_val=$(strip_comments $config_val) case "$config_opt" in ext[234]|xfs|btrfs|minix|nfs) add_dump_code "dump_fs $config_val" diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 10ecec6..c013430 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -245,6 +245,8 @@ kdump_install_conf() { while read config_opt config_val; do + # remove inline comments after the end of a directive. + config_val=$(strip_comments $config_val) case "$config_opt" in ext[234]|xfs|btrfs|minix|raw) sed -i -e "s#$config_val#$(kdump_to_udev_name $config_val)#" /tmp/$$-kdump.conf diff --git a/kdumpctl b/kdumpctl index d62b4b4..358ef05 100755 --- a/kdumpctl +++ b/kdumpctl @@ -10,6 +10,8 @@ SAVE_PATH=/var/crash SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" DUMP_TARGET="" +. /lib/kdump/kdump-lib.sh + standard_kexec_args="-p" if [ -f /etc/sysconfig/kdump ]; then @@ -106,6 +108,8 @@ function check_config() } while read config_opt config_val; do + # remove inline comments after the end of a directive. + config_val=$(strip_comments $config_val) case "$config_opt" in \#* | "") ;; @@ -263,6 +267,8 @@ function load_kdump() function check_ssh_config() { while read config_opt config_val; do + # remove inline comments after the end of a directive. + config_val=$(strip_comments $config_val) case "$config_opt" in sshkey) if [ -f "$config_val" ]; then diff --git a/mkdumprd b/mkdumprd index ea84df5..3e6061e 100644 --- a/mkdumprd +++ b/mkdumprd @@ -506,6 +506,8 @@ fi while read config_opt config_val; do + # remove inline comments after the end of a directive. + config_val=$(strip_comments $config_val) case "$config_opt" in extra_modules) extra_modules="$extra_modules $config_val"