layerscape: add restool package
[openwrt/openwrt.git] / package / network / utils / layerscape / restool / patches / 0009-scripts-workaround-for-a-improper-sed-substitution-T.patch
1 From ac387de9688099bca1fbdb587d078b369aaf2dab Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Wed, 25 Oct 2017 11:23:42 +0000
4 Subject: [PATCH 09/12] scripts: workaround for a improper sed substitution
5 (TODO)
6
7 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
8 ---
9 scripts/ls-main | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12 diff --git a/scripts/ls-main b/scripts/ls-main
13 index bd79295..7ce73f0 100755
14 --- a/scripts/ls-main
15 +++ b/scripts/ls-main
16 @@ -197,7 +197,7 @@ has_endpoint() {
17 ep=$($restool "$toe" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/")
18 fi
19
20 - if [[ "$ep" != *"No object associated"* && "$ep" != *"none"* ]]; then
21 + if [[ "$ep" != "endpoint: No object associated" && "$ep" != *"none"* ]]; then
22 echo "$1 is already linked to $ep"
23 exit 1
24 fi
25 @@ -230,7 +230,7 @@ get_endpoint() {
26 end_point=$($restool "$too" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/")
27 fi
28
29 - if [[ "$end_point" != *"No object associated"* && "$end_point" != *"none"* ]]; then
30 + if [[ "$end_point" != "endpoint: No object associated" && "$end_point" != *"none"* ]]; then
31 echo "$end_point"
32 fi
33 }
34 --
35 2.14.1
36