From a862a5f2d24f277fc3359b51ba2e8ddc3d6589b9 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 5 May 2023 15:09:49 +0000 Subject: [PATCH] Use the right executable ss/netstat in log message Ensure we log the same command we executed earlier --- hack/lib/etcd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index 46cbecae6f9..2ad2a3997f7 100755 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -45,7 +45,7 @@ kube::etcd::validate() { fi if ${port_check_command} -nat | grep "LISTEN" | grep "[\.:]${ETCD_PORT:?}" >/dev/null 2>&1; then kube::log::usage "unable to start etcd as port ${ETCD_PORT} is in use. please stop the process listening on this port and retry." - kube::log::usage "$(netstat -nat | grep "[\.:]${ETCD_PORT:?} .*LISTEN")" + kube::log::usage "$(${port_check_command} -nat | grep "LISTEN" | grep "[\.:]${ETCD_PORT:?}")" exit 1 fi