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 <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Pingfan Liu 2019-09-24 11:19:12 +08:00 committed by Kairui Song
parent a0db00d575
commit e07fc3e071
1 changed files with 7 additions and 0 deletions

View File

@ -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