On 12/15/14 at 03:10pm, WANG Chao wrote:
On 12/12/14 at 03:34pm, Baoquan He wrote:
echo
"$_fstype $_target" >> /tmp/$$-kdump.conf
>
> _path=${_save_path##"$_mntpoint"}
> - sed -i -e "s#$_save_path#$_path#" /tmp/$$-kdump.conf
> +
> + if [ -n "$(grep ^path "/etc/kdump.conf"| cut -d' '
-f2)" ]; then
I think you can use "get_option_value path" for both here and
where you get $_save_path
Good idea, will use it.
> + sed -i -e "s#$_save_path#$_path#" /tmp/$$-kdump.conf
I think there's a potential bug here. Say user configure kdump.conf
like the following:
kdump_post /var/crash/post.sh
path /var/crash
Then sed may replace "/var/crash/post.sh" with something else, depanding
on mount point.
I think it's worth to send another patch to fix all sed command with the
exact matching syntax. For example:
sed -i -e "s#^path[[:space:]]\+$_save_path#path $_path#"
Good catch, will change it.
Thanks
Thanks
WANG Chao
> + else
> + echo "path $_path" >> /tmp/$$-kdump.conf
> + fi
> fi
>
> }
> --
> 1.9.0
>
> _______________________________________________
> kexec mailing list
> kexec(a)lists.fedoraproject.org
>
https://lists.fedoraproject.org/mailman/listinfo/kexec