On 10/23/14 at 02:22pm, Minfei Huang wrote:
On 10/23/14 at 01:51pm, Dave Young wrote:
> On 10/20/14 at 12:56pm, WANG Chao wrote:
> > get_option_value() is used to get the value of $1 configured in
> > /etc/kdump.conf. But when we use "get_option_value ssh", it can get
the
> > value of "sshkey" instead of "ssh".
> >
> > Fix it by adding "-w" option to grep to get the match for the exact
> > word.
>
> Seems it will print the line with '-', who knows if we will add option with
> such character or not in the future...
>
> bash-4.2$ cat kdump.conf
> ssh-key
> bash-4.2$ grep -w ^ssh kdump.conf
> ssh-key
Maybe we can specify the ssh filter following to avoid conflict.
get_option_value "ssh[[:blank:]].*@"
Wrong. get_option_value() should be a simple interface to use:
get_option_value ssh -> ssh host dump target
get_option_value sshkey -> ssh key
Thanks
WANG Chao