[PATCH 7/9] Add NFS info to kdump-config show

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add NFS details and reorganize to make it conditional

Signed-off-by: Louis Bouchard <louis.bouchard at ubuntu.com>
---
 debian/kdump-config | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/debian/kdump-config b/debian/kdump-config
index 2818b56..37932ac 100755
--- a/debian/kdump-config
+++ b/debian/kdump-config
@@ -84,15 +84,21 @@ function kdump_show()
 	echo "KDUMP_SYSCTL:     $KDUMP_SYSCTL"
 	echo "KDUMP_COREDIR:    $KDUMP_COREDIR"
 	echo "crashkernel addr: $IOMEM_ADDR"
-	if [ -z $SSH ];then
-		echo "SSH:              local"
-	else
+
+	if [ -n "$SSH" ];then
 		echo "SSH:              $SSH"
+		SSH_KEY="${SSH_KEY:=/root/.ssh/kdump_id_rsa}"
+		echo "SSH_KEY:          $SSH_KEY"
 	fi
-	HOSTTAG="${HOSTTAG:=ip}"
-	echo "HOSTTAG:          $HOSTTAG"
-	SSH_KEY="${SSH_KEY:=/root/.ssh/kdump_id_rsa}"
-	echo "SSH_KEY:          $SSH_KEY"
+	if [ -n "$NFS" ]; then
+		echo "NFS:              $NFS"
+	fi
+
+	if [ -n "$SSH" ] || [ -n "$NFS" ]; then
+		HOSTTAG="${HOSTTAG:=ip}"
+		echo "HOSTTAG:          $HOSTTAG"
+	fi
+
 	if [ -e $sys_kexec_crash -a `cat $sys_kexec_crash` -eq 1 ] ; then
 		echo "current state:    ready to kdump";
 	else
-- 
1.9.1




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux