aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-12 11:29:32 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-12 11:29:32 +0200
commit8dd66cc8d8f51e0f9bbec4d7529f83fcb36dff55 (patch)
tree3e4f5d7155c4d4859c52a1c71d0b8090756a70a7
parent7da386db79a2f10ce0a357a76001638ff3310b70 (diff)
wm-request: use a preset UUID if uuidgen cannot be found
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rwxr-xr-xscripts/wm-request21
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/wm-request b/scripts/wm-request
index f9244ab..b9a703a 100755
--- a/scripts/wm-request
+++ b/scripts/wm-request
@@ -13,7 +13,19 @@ then
exit 1
fi
-for i in uuidgen afb-client-demo
+UUIDFILE=/tmp/wm-request-uuid
+if ! which uuidgen 2>/dev/null 1>&2
+then
+ echo "c7c638c5-d097-4eb4-9012-a1e4c25b9808" > $UUIDFILE
+else
+ if ! [ -f $UUIDFILE ]
+ then
+ uuidgen > $UUIDFILE
+ fi
+fi
+UUID="`cat $UUIDFILE`"
+
+for i in afb-client-demo
do
which $i 2>/dev/null 1>&2 || { echo "Program $i is missing" >&2; exit 1; }
done
@@ -41,13 +53,6 @@ fi
verb=$1
shift
-UUIDFILE=/tmp/wm-request-uuid
-if ! [ -f $UUIDFILE ]
-then
- uuidgen > $UUIDFILE
-fi
-UUID="`cat $UUIDFILE`"
-
set +u
args=
if [ "$1" ]