[kexec-tools/f17] Handle net option for nfs in kdump.conf correctly

Cong Wang wangcong at fedoraproject.org
Fri Mar 30 03:42:34 UTC 2012


commit f590d235e06741ef8ddf4a5e2e60b7661eddb225
Author: Chao Wang <chaowang at redhat.com>
Date:   Wed Mar 28 16:23:38 2012 +0800

    Handle net option for nfs in kdump.conf correctly
    
    Resolve: bug 807521
    
    The fix is easy.
    
    Command sed should be called with option -n to remain slience when DUMP_TARGET
    is a nfs server like 'nfs.server:/mnt/testarea/nfs'.
    
    Then nfs function check_ssh_config will return 1 to not to config nfs like a
    ssh dump
    
    Signed-off-by: Chao Wang <chaowang at redhat.com>

 kdumpctl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/kdumpctl b/kdumpctl
index ad5a488..842afa3 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -198,7 +198,7 @@ function check_ssh_config()
 	done < $KDUMP_CONFIG_FILE
 
 	#make sure they've configured kdump.conf for ssh dumps
-	local SSH_TARGET=`echo -n $DUMP_TARGET|sed '/.*@/p'`
+	local SSH_TARGET=`echo -n $DUMP_TARGET | sed -n '/.*@/p'`
 	if [ -z "$SSH_TARGET" ]; then
 		return 1
 	fi


More information about the scm-commits mailing list