feat: mount main partition for cloud-init configuration

This commit is contained in:
Laborratte 5 2026-03-25 14:39:41 +01:00
parent f1be35cb05
commit d289f49cfb
Signed by: Laborratte5
GPG key ID: 3A30072E35202C02

View file

@ -20,8 +20,25 @@ EOF
resize2fs -p "$device"p$partnr
}
mount_temporary () {
partnr=$1
temp_mnt_point=$(mktemp -d)
mount "$SD_CARD"p"$partnr" $temp_mnt_point
echo $temp_mnt_point
}
unmount_temporary () {
handle=$1
umount $1
rmdir $1
}
read -e -p "Compressed Image file: " IMG_FILE
read -e -p "SD Card: " SD_CARD
flash_sd "$IMG_FILE" "$SD_CARD"
enlarge_partition "$SD_CARD"
mnt_handle=$(mount_temporary "1")
unmount_temporary $mnt_handle