diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-10-30 21:39:40 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-10-30 21:45:45 +0100 |
commit | 5f7901dcb8519fe1d553bffda803a8d8da8e5af5 (patch) | |
tree | ed88ebb5b22db1aa7f392ce72f2e36cac501b025 /scripts/afm-util.in | |
parent | dc0836fcc3969b7f6bb34e1a0878b9750221ade0 (diff) |
afm-util: Fix report of error
The script afm-util wasn't reporting correctly
errors. The use of the output status of
afb-client-demo was possible but this solution
is simplest to output the error message.
Bug-AGL: SPEC-1863
Change-Id: I5ac919e615ed5c0f21589292e94a9c3d6209a83f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'scripts/afm-util.in')
-rwxr-xr-x | scripts/afm-util.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/afm-util.in b/scripts/afm-util.in index 40bc7da..3f47d97 100755 --- a/scripts/afm-util.in +++ b/scripts/afm-util.in @@ -2,7 +2,7 @@ send() { afb-client-demo -H -d unix:@afm_platform_rundir@/apis/ws/afm-main "$1" "$2" | - awk '$1=="ON-REPLY-FAIL"{$1="ERROR:";$2="";print;exit 1;}NR>1' + awk '$1=="ON-REPLY" && $3!="success"{$1="ERROR:";$2="";print > "/dev/stderr";exit 1;}NR>1' } case "$1" in |