aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch
blob: c642afcafa0dce52c48160200b4d7f025a1d4a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From ac387de9688099bca1fbdb587d078b369aaf2dab Mon Sep 17 00:00:00 2001
From: Ioana Ciornei <ioana.ciornei@nxp.com>
Date: Wed, 25 Oct 2017 11:23:42 +0000
Subject: [PATCH 09/12] scripts: workaround for a improper sed substitution
 (TODO)

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
 scripts/ls-main | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/ls-main b/scripts/ls-main
index bd79295..7ce73f0 100755
--- a/scripts/ls-main
+++ b/scripts/ls-main
@@ -197,7 +197,7 @@ has_endpoint() {
 		ep=$($restool "$toe" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/")
 	fi
 
-	if [[ "$ep" != *"No object associated"* && "$ep" != *"none"* ]]; then
+	if [[ "$ep" != "endpoint: No object associated" && "$ep" != *"none"* ]]; then
 		echo "$1 is already linked to $ep"
 		exit 1
 	fi
@@ -230,7 +230,7 @@ get_endpoint() {
 		end_point=$($restool "$too" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/")
 	fi
 
-	if [[ "$end_point" != *"No object associated"* && "$end_point" != *"none"* ]]; then
+	if [[ "$end_point" != "endpoint: No object associated" && "$end_point" != *"none"* ]]; then
 		echo "$end_point"
 	fi
 }
-- 
2.14.1