Improve ping output to be less verbose 49/51749/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 11 Feb 2017 05:22:01 +0000 (00:22 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 11 Feb 2017 05:22:03 +0000 (00:22 -0500)
The full ping output takes a lot of log space and makes the logs hard to
read. We are only interested in knowing what IP it's pinging and if it
was success or fail so configure a custom message.

Change-Id: I5a03963accf9800c1fcd154293e5245d889a7709
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/opendaylight-infra-copy-ssh-keys.sh

index 1b0ce6ebd4ed8cc03e882befb38e55af60b2127b..2b2267786d357a08ba0843c8b1b6d9d822b1ac6d 100644 (file)
@@ -19,7 +19,11 @@ function copy-ssh-keys-to-slave() {
         fi
 
         # ping test to see if connectivity is available
-        ping -c1 ${i}
+        if ping -c1 ${i} &> /dev/null; then
+            echo "Ping to ${i} successful."
+        else
+            echo "Ping to ${i} failed."
+        fi
     done
 }