V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -57,7 +57,7 @@ EOF
|
||||
echo "" >> "${RECOVERY}"/etc/crypttab
|
||||
do_log "info" "file_only" "crypttab entry generated: '${MAP_PATH_CRYPT["${KEY}"]} UUID=${MAP_UUID_CRYPT["${ENCRYPTION_LABEL}"]} none luks,discard'."
|
||||
|
||||
# TODO: Update loop to iterate thru dynamic number of ephemeral drives.
|
||||
|
||||
# Generate '${RECOVERY}/etc/crypttab' special ephemeral entries.
|
||||
declare -a EPHEMERAL_MOUNT_PATH=("SWAP" "/tmp")
|
||||
declare KEY=""
|
||||
@@ -70,7 +70,6 @@ EOF
|
||||
|
||||
# shellcheck disable=2129
|
||||
echo "# ${KEY} was on ${MAP_EPHEMERAL_DEV[${KEY}]} during installation" >> "${RECOVERY}"/etc/crypttab
|
||||
# TODO: Change static 'LABEL=' to dynamic extraction of partitioning.yaml 'recipe_..._filesystem_label' recipe string.
|
||||
echo "${MAP_EPHEMERAL_ENCLABEL[${KEY}]} LABEL=SWAP /dev/random swap,offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096" >> "${RECOVERY}"/etc/crypttab
|
||||
echo "" >> "${RECOVERY}"/etc/crypttab
|
||||
do_log "info" "file_only" "'${RECOVERY}/etc/crypttab' entry generated: '${MAP_EPHEMERAL_ENCLABEL[${KEY}]} LABEL=SWAP /dev/random swap,offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096'."
|
||||
@@ -79,7 +78,6 @@ EOF
|
||||
|
||||
# shellcheck disable=2129
|
||||
echo "# ${KEY} was on ${MAP_EPHEMERAL_DEV[${KEY}]} during installation" >> "${RECOVERY}"/etc/crypttab
|
||||
# TODO: Change static 'LABEL=' to dynamic extraction of partitioning.yaml 'recipe_..._filesystem_label' recipe string.
|
||||
echo "${MAP_EPHEMERAL_ENCLABEL[${KEY}]} LABEL=ext4_tmp /dev/random offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096,tmp=ext4" >> "${RECOVERY}"/etc/crypttab
|
||||
echo "" >> "${RECOVERY}"/etc/crypttab
|
||||
do_log "info" "file_only" "'${RECOVERY}/etc/crypttab' entry generated: '${MAP_EPHEMERAL_ENCLABEL[${KEY}]} LABEL=ext4_tmp /dev/random offset=2048,cipher=aes-xts-plain64,size=512,sector-size=4096,tmp=ext4'."
|
||||
@@ -119,9 +117,6 @@ EOF
|
||||
# MAP_UUID_CRYPT["${ENCRYPTION_LABEL}"]="${UUID}"
|
||||
# MAP_PATH_CRYPT["${MOUNT_PATH}"]="${ENCRYPTION_LABEL}"
|
||||
|
||||
# TODO: BEGIN: BLOCK "${RECOVERY}"/etc/fstab
|
||||
# TODO: complete this block
|
||||
|
||||
# Generate '${TARGET}/etc/fstab' special entries '/' '/boot' '/boot/efi'.
|
||||
# Define the order of the special keys.
|
||||
declare -a KEY_ORDER
|
||||
@@ -351,7 +346,6 @@ EOF
|
||||
|
||||
done
|
||||
|
||||
# TODO: flexible entries for more than one CD-ROM drives.
|
||||
# Add entry for CD-ROM device
|
||||
# shellcheck disable=2129
|
||||
echo "# /media/cdrom0 was on /dev/sr0 during installation" >> "${TARGET}"/etc/fstab
|
||||
@@ -368,7 +362,7 @@ EOF
|
||||
do_log "info" "file_only" "fstab entry generated: 'proc /proc proc nodev,nosuid,noexec,hidepid=2 0 0'."
|
||||
do_log "info" "file_only" "fstab entry generated: 'tmpfs /dev/shm tmpfs rw,nodev,nosuid,noexec,relatime,size=1G 0 0'."
|
||||
|
||||
# TODO: flexible 'SWAP' entry, not only ephemeral SWAP.
|
||||
|
||||
# Add entry for SWAP device
|
||||
declare MOUNT_PATH="SWAP"
|
||||
# shellcheck disable=2129
|
||||
@@ -377,7 +371,7 @@ EOF
|
||||
echo "" >> "${TARGET}"/etc/fstab
|
||||
do_log "info" "file_only" "fstab entry generated: '${MAP_EPHEMERAL_ENCLABEL["${MOUNT_PATH}"]} none swap defaults 0 0'."
|
||||
|
||||
# TODO: flexible '/tmp' entry, not only ephemeral SWAP.
|
||||
|
||||
# Add entry for '/tmp' device
|
||||
declare MOUNT_PATH="/tmp"
|
||||
# shellcheck disable=2129
|
||||
@@ -386,9 +380,8 @@ EOF
|
||||
echo "" >> "${TARGET}"/etc/fstab
|
||||
do_log "info" "file_only" "fstab entry generated: '${MAP_EPHEMERAL_ENCLABEL["${MOUNT_PATH}"]} /tmp ext4 defaults,rw,nodev,nosuid,relatime 0 0'."
|
||||
|
||||
# TODO: END: BLOCK "${RECOVERY}"/etc/fstab
|
||||
# TODO: complete this block
|
||||
|
||||
do_show_footer "${MODULE_TXT}"
|
||||
|
||||
|
||||
}
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh:
|
||||
|
||||
Reference in New Issue
Block a user