From e07fc3e071cb2ce5a71ee60c341b4d26a68e600a Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Tue, 24 Sep 2019 11:19:12 +0800 Subject: [PATCH] kdumpctl: echo msg when waiting for connection Print some message during the long wait period to reflect the process. The message will look like: Network dump target is not usable, waiting for it to be ready ... Signed-off-by: Pingfan Liu Acked-by: Kairui Song --- kdumpctl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kdumpctl b/kdumpctl index f75b820..dc0c64b 100755 --- a/kdumpctl +++ b/kdumpctl @@ -736,6 +736,7 @@ check_ssh_config() check_and_wait_network_ready() { local start_time=$(date +%s) + local warn_once=1 local cur local diff local retval @@ -760,6 +761,12 @@ check_and_wait_network_ready() return 1 fi + if [ $warn_once -eq 1 ]; then + echo "Network dump target is not usable, waiting for it to be ready" + warn_once=0 + fi + echo -n . + cur=$(date +%s) let "diff = $cur - $start_time" # 60s time out