V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m29s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m29s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -185,45 +185,39 @@ mount_partition() {
|
||||
|
||||
fi
|
||||
|
||||
|
||||
device=$(resolve_device "$var_dev" "$var_part" "$var_encryption_enable" "$var_encryption_label")
|
||||
mount_with_dir "$var_mount_path" "$device" "$var_btrfs_compression_options"
|
||||
|
||||
case "${var_fs_version,,}:${var_encryption_enable}" in
|
||||
btrfs:true) … ;;
|
||||
btrfs:false) … ;;
|
||||
ext4:true) … ;;
|
||||
ext4:false) … ;;
|
||||
*) do_log error false "Unsupported fs/encryption combination."
|
||||
exit "$ERR_MOUNTING_DEV" ;;
|
||||
btrfs:true)
|
||||
declare var_btrfs_compression_options="compress=${var_fs_btrfs_compress}:${var_fs_btrfs_level}"
|
||||
# shellcheck disable=SC2155
|
||||
declare device=$(resolve_device "${var_dev}" "${var_part}" "${var_encryption_enable}" "${var_encryption_label}")
|
||||
mount_with_dir "${var_mount_path}" "${device}" "${var_btrfs_compression_options}"
|
||||
[[ -n ${var_mount_subvolume} ]] && create_btrfs_subvolume "${var_mount_path}" "${var_mount_subvolume}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '${device}'."
|
||||
;;
|
||||
btrfs:false)
|
||||
declare var_btrfs_compression_options="compress=${var_fs_btrfs_compress}:${var_fs_btrfs_level}"
|
||||
# shellcheck disable=SC2155
|
||||
declare device=$(resolve_device "${var_dev}" "${var_part}" "${var_encryption_enable}" "${var_encryption_label}")
|
||||
mount_with_dir "${var_mount_path}" "${device}" "${var_btrfs_compression_options}"
|
||||
[[ -n ${var_mount_subvolume} ]] && create_btrfs_subvolume "${var_mount_path}" "${var_mount_subvolume}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '${device}'."
|
||||
;;
|
||||
ext4:true)
|
||||
# shellcheck disable=SC2155
|
||||
declare device=$(resolve_device "${var_dev}" "${var_part}" "${var_encryption_enable}" "${var_encryption_label}")
|
||||
mount_with_dir "${var_mount_path}" "${device}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '${device}'."
|
||||
;;
|
||||
ext4:false)
|
||||
# shellcheck disable=SC2155
|
||||
declare device=$(resolve_device "${var_dev}" "${var_part}" "${var_encryption_enable}" "${var_encryption_label}")
|
||||
mount_with_dir "${var_mount_path}" "${device}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '${device}'."
|
||||
;;
|
||||
*) do_log "error" "false" "Unsupported fs/encryption combination."
|
||||
exit "${ERR_MOUNTING_DEV}" ;;
|
||||
esac
|
||||
|
||||
if [[ "${var_fs_version,,}" == "btrfs" && "${var_encryption_enable}" == "true" ]]; then
|
||||
|
||||
declare var_btrfs_compression_options="compress=${var_fs_btrfs_compress}:${var_fs_btrfs_level}"
|
||||
mount_with_dir "${var_mount_path}" "/dev/mapper/${var_encryption_label}" "${var_btrfs_compression_options}"
|
||||
[[ -n ${var_mount_subvolume} ]] && create_btrfs_subvolume "${var_mount_path}" "${var_mount_subvolume}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '/dev/mapper/${var_encryption_label}'."
|
||||
|
||||
elif [[ "${var_fs_version,,}" == "btrfs" && "${var_encryption_enable}" == "false" ]]; then
|
||||
|
||||
declare var_btrfs_compression_options="compress=${var_fs_btrfs_compress}:${var_fs_btrfs_level}"
|
||||
mount_with_dir "${var_mount_path}" "/dev/${var_dev}${var_part}" "${var_btrfs_compression_options}"
|
||||
[[ -n ${var_mount_subvolume} ]] && create_btrfs_subvolume "${var_mount_path}" "${var_mount_subvolume}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '/dev/${var_dev}${var_part}'."
|
||||
|
||||
elif [[ "${var_fs_version,,}" == "ext4" && "${var_encryption_enable}" == "true" ]]; then
|
||||
|
||||
mount_with_dir "${var_mount_path}" "/dev/mapper/${var_encryption_label}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '/dev/mapper/${var_encryption_label}'."
|
||||
|
||||
elif [[ "${var_fs_version,,}" == "ext4" && "${var_encryption_enable}" == "false" ]]; then
|
||||
|
||||
mount_with_dir "${var_mount_path}" "/dev/${var_dev}${var_part}"
|
||||
do_log "info" "false" "Mounted: '${var_mount_path}' on: '/dev/${var_dev}${var_part}'."
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user