From 270fa57d64acad504849da61f922f8f2ad77c6bc Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Mon, 2 Dec 2019 10:34:18 +0000 Subject: [PATCH] [FIX] point_of_sale: Rename posbox.img to iotbox.img Renames the file created by the build, from "posbox.img" to "iotbox.img" closes odoo/odoo#41190 X-original-commit: 3abe39e785d28d1e0b1a18eb9b98c1d341e5a116 Signed-off-by: Quentin Lejeune (qle) --- .../point_of_sale/tools/posbox/posbox_create_image.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/point_of_sale/tools/posbox/posbox_create_image.sh b/addons/point_of_sale/tools/posbox/posbox_create_image.sh index 6fa95cd6ca0..d8b3a66ba90 100755 --- a/addons/point_of_sale/tools/posbox/posbox_create_image.sh +++ b/addons/point_of_sale/tools/posbox/posbox_create_image.sh @@ -36,7 +36,7 @@ if ! file_exists *raspbian*.img ; then unzip raspbian.img.zip fi -cp -a *raspbian*.img posbox.img +cp -a *raspbian*.img iotbox.img CLONE_DIR="${OVERWRITE_FILES_BEFORE_INIT_DIR}/home/pi/odoo" @@ -68,11 +68,11 @@ mv /tmp/ngrok "${USR_BIN}" # zero pad the image to be around 3.5 GiB, by default the image is only ~1.3 GiB echo "Enlarging the image..." -dd if=/dev/zero bs=1M count=2048 >> posbox.img +dd if=/dev/zero bs=1M count=2048 >> iotbox.img # resize partition table echo "Fdisking" -START_OF_ROOT_PARTITION=$(fdisk -l posbox.img | tail -n 1 | awk '{print $2}') +START_OF_ROOT_PARTITION=$(fdisk -l iotbox.img | tail -n 1 | awk '{print $2}') (echo 'p'; # print echo 'd'; # delete echo '2'; # second partition @@ -82,9 +82,9 @@ START_OF_ROOT_PARTITION=$(fdisk -l posbox.img | tail -n 1 | awk '{print $2}') echo "${START_OF_ROOT_PARTITION}"; # starting at previous offset echo ''; # ending at default (fdisk should propose max) echo 'p'; # print - echo 'w') | fdisk posbox.img # write and quit + echo 'w') | fdisk iotbox.img # write and quit -LOOP=$(kpartx -avs posbox.img) +LOOP=$(kpartx -avs iotbox.img) LOOP_MAPPER_PATH=$(echo "${LOOP}" | tail -n 1 | awk '{print $3}') LOOP_PATH="/dev/${LOOP_MAPPER_PATH::-2}" LOOP_MAPPER_PATH="/dev/mapper/${LOOP_MAPPER_PATH}"