From 6895a71cc49e49e261585714a8d06c5eb151746d Mon Sep 17 00:00:00 2001 From: Joern Siglen Date: Wed, 25 Oct 2023 17:03:34 +0200 Subject: [PATCH] dbginfo.sh: remove brakets on lsqeth device list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in customer situation we found lsqeth listing devices like: Device name : (unnamed net_device) Device name : enc2000 Device name : enc3000 - the braket around the "unnamed" device is braking the function call and leads to stop the dbginfo.sh script. - this patch removes brakets > the functions call works and call of osaoat will report an unknown device instead of braking the dbginfo.sh script Reviewed-by: Mario Held Signed-off-by: Joern Siglen Signed-off-by: Jan Höppner --- scripts/dbginfo.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh index e2163868..d6c3b8ef 100755 --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -910,7 +910,8 @@ collect_osaoat() { local network_device network_devices=$(lsqeth 2>/dev/null | grep "Device name" \ - | sed 's/D.*:[[:space:]]*\([^[:space:]]*\)[[:space:]]\+/\1/g') + | sed 's/D.*:[[:space:]]*\([^[:space:]]*\)[[:space:]]\+/\1/g' \ + | sed 's/[()]//g' ) if type qethqoat >/dev/null; then if test -n "${network_devices}"; then pr_collect_output "osa oat"