Added draft for storage encryption procedures

This commit is contained in:
2020-05-20 10:35:37 +02:00
parent 78bee8d0cc
commit 7f629205ef
11 changed files with 99 additions and 30 deletions

View File

@@ -65,6 +65,23 @@ error(){
exit 1;
}
# Routine to echo the full sd-card-path
set_device_path(){
info "Available devices:"
ls -lasi /dev/ | grep -E "sd|mm"
question "Please type in the name of the device: /dev/" && read -r device
device_path="/dev/$device"
if [ ! -b "$device_path" ]
then
error "$device_path is not valid device."
fi
# @see https://www.heise.de/ct/hotline/Optimale-Blockgroesse-fuer-dd-2056768.html
OPTIMAL_BLOCKSIZE=$(expr 64 \* "$(sudo cat /sys/block/$device/queue/physical_block_size)") &&
info "Device path set to: $device_path" &&
info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" ||
error
}
HEADER(){
echo
echo "${COLOR_YELLOW}The"