diff --git a/scripts/image_signing/remove_test_label.sh b/scripts/image_signing/remove_test_label.sh index 976f5e6d76..6423e39030 100755 --- a/scripts/image_signing/remove_test_label.sh +++ b/scripts/image_signing/remove_test_label.sh @@ -13,7 +13,6 @@ set -e image=$1 -rootfs=$(mktemp -d) +rootfs=$(make_temp_dir) mount_image_partition ${image} 3 ${rootfs} -trap "umount ${rootfs}; rm -rf ${rootfs}" EXIT sed -i 's/test//' "${rootfs}/etc/lsb-release" diff --git a/scripts/image_signing/set_lsb_release.sh b/scripts/image_signing/set_lsb_release.sh index 3299d5bffb..5d859d8132 100755 --- a/scripts/image_signing/set_lsb_release.sh +++ b/scripts/image_signing/set_lsb_release.sh @@ -47,9 +47,8 @@ EOF exit 1 fi - local rootfs=$(mktemp -d) + local rootfs=$(make_temp_dir) mount_image_partition_ro "$image" 3 "$rootfs" - trap "sudo umount $rootfs; rm -rf $rootfs" EXIT if [ -n "$key" ]; then sudo umount "$rootfs" mount_image_partition "$image" 3 "$rootfs"