From 655de403ad25a5332b25174009107884f9b30420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 19 Dec 2009 16:13:21 +0200 Subject: Simplify various string match constructs. --- rc.d/init.d/netconsole | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc.d/init.d/netconsole') diff --git a/rc.d/init.d/netconsole b/rc.d/init.d/netconsole index 17296f8e..7f91a6c6 100644 --- a/rc.d/init.d/netconsole +++ b/rc.d/init.d/netconsole @@ -47,7 +47,7 @@ print_address_info () [ -z "$DEV" ] && DEV=$(echo $route | sed "s|.* dev \([^ ]*\).*|\1|") echo "DEV=$DEV" echo "LOCALADDR=$(echo $route | sed "s|.* src \([^ ]*\).*|\1|")" - if echo $route | grep -q " via " ; then + if [[ $route == *" via "* ]] ; then via=$(echo $route | sed "s|.* via \([^ ]*\).*|\1|") target=$via else -- cgit v1.2.1