On 06/18/15 at 08:56pm, Minfei Huang wrote:
On 06/18/15 at 10:34am, Dave Young wrote:
> On 06/13/15 at 02:51pm, Minfei Huang wrote:
> > +
> > + if [ "x" != "x"$_srcaddr ] && `echo $_srcaddr
| grep -q "%"`; then
> > + local _orig_netdev=${_srcaddr#*\%}
> > + _orig_netdev=${_orig_netdev%]*}
> > + local _pre_netdev=$(kdump_setup_ifname $_orig_netdev)
> > + if [ "x"$_orig_netdev != "x"$_pre_netdev ]; then
> > + sed -i "s#$_orig_netdev#$_pre_netdev#" $_tmp_conf
>
> It is risky to search and replace in whole config file, reassemble the
> dump target line with nwe _srcaddr and other parts then replace the ssh
> or nfs line, it will be better.
>
> Is it difficult?
>
Actually, I think it is fine, since the netdevice name is so special, in
the other hand, we replace the config which is used in 2nd kernel.
The case you worry never corrupt the config in /etc/kdump.conf.
Kdump will fail if it corrupt 2nd kernel kdump.conf
But I do not insist my view. If you think it is necessary, I can modify
it.
Yes, I think it is necessary, to only replace netdev part instead of whole
config file..
Thanks
Dave