diff options
author | 2016-11-30 20:33:52 +0100 | |
---|---|---|
committer | 2016-11-30 20:37:12 +0100 | |
commit | 6643e51c254d2dfed65f03568d1ce11e000f01c3 (patch) | |
tree | 21e49ccd23ea04e241cb5b7cd52d80164e2a3d2d /tools/scripts/run_xnbd_server | |
parent | 46067f331f1acb9512795a04b6f2f095b5470ecd (diff) |
Initial content
Change-Id: I330ad2e8b08a4743e752b8fe9d1ccf9fa1215f8a
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'tools/scripts/run_xnbd_server')
-rwxr-xr-x | tools/scripts/run_xnbd_server | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/scripts/run_xnbd_server b/tools/scripts/run_xnbd_server new file mode 100755 index 0000000..190301d --- /dev/null +++ b/tools/scripts/run_xnbd_server @@ -0,0 +1,16 @@ +#!/bin/bash + +. /etc/xdtrc + +MACHINE=${1:-porter} +IMAGE=${2:-${XDT_BUILD}/tmp/deploy/images/${MACHINE}/agl-demo-platform-crosssdk-${MACHINE}.ext4} + +echo "Using MACHINE=$MACHINE IMAGE=$IMAGE" + +[[ ! -f $IMAGE ]] && { echo "Invalid image $IMAGE"; exit 1; } + +REALIMG=$(realpath $IMAGE) +[[ ! -f ${REALIMG}.bak ]] && cp -v ${REALIMG} ${REALIMG}.bak + +sudo systemctl restart tftpd-hpa +sudo xnbd-server --target --lport 10809 $IMAGE |