On 04/03/14 at 02:32pm, WANG Chao wrote:
On 03/31/14 at 03:17pm, Baoquan He wrote:
> +default_dump_target_install_conf()
> +{
> + local _target _fstype
> + local _s _t
> + local _mntpoint
> + local _path _save_path
> +
> + is_user_configured_dump_target && return
> +
> + _save_path=$(grep ^path "/etc/kdump.conf"| cut -d' ' -f2)
> + [ -z "$_save_path" ] && _save_path=$DEFAULT_PATH
> +
> + _mntpoint=$(get_mntpoint_from_path $_save_path)
> + _target=$(get_target_from_path $_save_path)
> + if [ "$_mntpoint" != "/" ]; then
> + _fstype=$(get_fs_type_from_target $_target)
> +
> + if [ "$_fstype" = "nfs" ];then
> + kdump_install_net "$_target"
$_fstype could be "nfs4" (I found this on my setup) and kdump will fail.
You need to handle this "nfs4" case as well.
Good catch, chao. I used rhel7 client and rhel5 server to test, then
fstype is always nfs when I execute findmnt. When use rhel7 client and
fedora server, fstype is nfs4 when execute findmnt.
Hi Steve,
So from v4, has the rule been changed? It will return nfs4 or nfs, why
not doing like before?
I am not sure who is the maintainer of util-linux which contains
findmnt, do you know this?
Thanks
Baoquan
Thanks
WANG Chao
> + else
> + _target=$(kdump_to_udev_name $_target)
> + fi
> +
> + echo "$_fstype $_target" >> /tmp/$$-kdump.conf
> +
> + _path=${_save_path##"$_mntpoint"}
> + sed -i -e "s#$_save_path#$_path#" /tmp/$$-kdump.conf
> + fi
> +
> +}
> +