From a7caf1482b72831bbf57fcad49dc5b669d1877b3 Mon Sep 17 00:00:00 2001 From: Changcheng Liu Date: Wed, 6 Mar 2019 16:14:25 +0800 Subject: [PATCH] vstart.sh: fix typo when getting ipv4 address Signed-off-by: Changcheng Liu --- src/vstart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vstart.sh b/src/vstart.sh index 417b478b901c9..427710413de54 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -972,7 +972,7 @@ else else IP_CMD="ifconfig" fi - # filter out IPv6 and localhost addresses + # filter out IPv4 and localhost addresses IP="$($IP_CMD | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | head -n1)" # if nothing left, try using localhost address, it might work if [ -z "$IP" ]; then IP="127.0.0.1"; fi -- 2.39.5