kdumpctl: multi dump target checking fix
Resolves: bz867703
For both ssh and sshkey specified in kdump.conf, we will error out:
[..]
+ start
+ local nr
++ awk 'BEGIN{cnt=0} /^raw|^ssh|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' /etc/kdump.conf
+ nr=2
+ '[' 2 -gt 1 ']'
+ echo -n 'Error: More than one dump targets specified'
Error: More than one dump targets specified+ echo
Fix this by Improving the patterns for multi dump targes checking
with one more space.
Thanks ChaoWang for catching this and providing the fix.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
0f8bd150db
commit
d17cf94ea9
2
kdumpctl
2
kdumpctl
@ -364,7 +364,7 @@ function save_raw()
|
|||||||
function start()
|
function start()
|
||||||
{
|
{
|
||||||
local nr
|
local nr
|
||||||
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
|
nr=$(awk 'BEGIN{cnt=0} /^raw |^ssh |^nfs |^ext[234] |^xfs |^btrfs |^minix /{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
|
||||||
[ $nr -gt 1 ] && {
|
[ $nr -gt 1 ] && {
|
||||||
echo -n "Error: More than one dump targets specified"; echo
|
echo -n "Error: More than one dump targets specified"; echo
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user