From 306e2b6bbe7f172e23607dc2b961b42e6e93c5bb Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 11 Sep 2024 16:23:46 +0200 Subject: [PATCH] linux: ethernet: Fix grep parameter case for busybox The -A parameter has to be uppercase to work with busybox. As far as I can see it is uppercase in the help of different Linux, but seems to work in lowercase too - but not in busybox. --- automated/linux/ethernet/ethernet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated/linux/ethernet/ethernet.sh b/automated/linux/ethernet/ethernet.sh index 181fa9c75..a5a27c751 100755 --- a/automated/linux/ethernet/ethernet.sh +++ b/automated/linux/ethernet/ethernet.sh @@ -37,7 +37,7 @@ ip addr ip addr show "${INTERFACE}" # Get IP address of a given interface -IP_ADDR=$(ip addr show "${INTERFACE}" | grep -a2 "state UP" | tail -1 | awk '{print $2}' | cut -f1 -d'/') +IP_ADDR=$(ip addr show "${INTERFACE}" | grep -A2 "state UP" | tail -1 | awk '{print $2}' | cut -f1 -d'/') [ -n "${IP_ADDR}" ] exit_on_fail "ethernet-ping-state-UP" "ethernet-ping-route"