From bbd98d2b0cf5bbd6ae87ef2df7de7669204af304 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Mon, 16 Oct 2023 04:51:05 +0300 Subject: [PATCH] fix: check for error in script Signed-off-by: Boris Glimcher --- scripts/change_image.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/change_image.sh b/scripts/change_image.sh index 4fc6b1f1..8d1bab1b 100755 --- a/scripts/change_image.sh +++ b/scripts/change_image.sh @@ -47,6 +47,9 @@ curl -i --user my-admin@example.com:my-secret -H "Accept:application/yang-data+j # change boot image from https://www.watsen.net/docs/sztpd/current/admin-guide/#example-put-ing-an-entry-before-another-entry curl -i -X PUT --user my-admin@example.com:my-secret --data @/tmp/boot-images.json -H 'Content-Type:application/yang-data+json' ${BOOTSTRAP_URL}/wn-sztpd-1:boot-images | tee /tmp/result.json +# check for errors +grep -v "error-message" /tmp/result.json + # read back to check configuration was set curl -i --user my-admin@example.com:my-secret -H "Accept:application/yang-data+json" ${BOOTSTRAP_URL} > /tmp/running_after.json