Skip to content

Commit

Permalink
fix: use basename when changing boot image name
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Oct 17, 2023
1 parent 635e4ec commit 478859f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/change_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ sleep 5
docker-compose ps

# define values
BOOT_IMG_FULL_PATH=../sztp-server/conf/my-second-boot-image.img
BOOTSTRAP_URL=http://localhost:7080/restconf/ds/ietf-datastores:running
BOOT_IMG_PATH=my-second-boot-image.img
BOOT_IMG_HASH_VAL=`openssl dgst -sha256 -c ${BOOT_IMG_PATH} | awk '{print $2}'`
BOOT_IMG_PATH=$(basename ${BOOT_IMG_FULL_PATH})
BOOT_IMG_HASH_VAL=`openssl dgst -sha256 -c ${BOOT_IMG_FULL_PATH} | awk '{print $2}'`

# create input json file for curl
cat << EOM > /tmp/boot-images.json
Expand Down

0 comments on commit 478859f

Please sign in to comment.