linux-image-manager/scripts/encryption/storage/raid1/base.sh

23 lines
930 B
Bash
Raw Normal View History

2020-12-20 21:16:56 +01:00
#!/bin/bash
2020-12-20 21:58:11 +01:00
# shellcheck disable=SC1090 # Can't follow non-constant source. Use a directive to specify location.
# shellcheck disable=SC2015 # Deactivating bool hint
# shellcheck disable=SC2034 # Unused variables
# shellcheck disable=SC2154 # Referenced but not assigned
2020-12-20 21:16:56 +01:00
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
set_raid1_devices_mount_partition_and_mapper_paths(){
info "RAID1 partition 1..." &&
set_device_mount_partition_and_mapper_paths &&
partition_path_1=$partition_path &&
mapper_name_1=$mapper_name &&
mapper_path_1=$mapper_path &&
mount_path_1=$mount_path &&
2020-12-20 22:17:07 +01:00
device_path_1=$device_path &&
2020-12-20 21:16:56 +01:00
info "RAID1 partition 2..." &&
set_device_mount_partition_and_mapper_paths &&
partition_path_2=$partition_path &&
mapper_name_2=$mapper_name &&
mapper_path_2=$mapper_path &&
2020-12-20 22:17:07 +01:00
mount_path_2=$mount_path &&
device_path_2=$device_path || error
2020-12-20 21:16:56 +01:00
}