diff --git a/src/freedombone-backup-local b/src/freedombone-backup-local index 923d0707da300124541ba0be77a6ad2eaad0aa4c..4a6398b17bc1668bc28a2423c49779f0bf5a9904 100755 --- a/src/freedombone-backup-local +++ b/src/freedombone-backup-local @@ -375,7 +375,12 @@ remove_option="$2" if [[ "$backup_device" == "remove" ]]; then remove_option=$1 fi -if [[ "$backup_device" == "detect" || "$backup_device" == "auto"* ]]; then +simple_backup= +if [[ "$backup_device" == "simple" || "$backup_device" == "detect" || "$backup_device" == "auto"* ]]; then + if [[ "$backup_device" == "simple" ]]; then + # shellcheck disable=SC2034 + simple_backup=1 + fi backup_device=$(detect_connected_drives) if [[ "$backup_device" != 'sd'* ]]; then echo $'No backup device was detected' diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local index fc0ff0574379d5ab5953b263b9aa4d657fd43e88..b55fbfc485006ecbf5db3abfadd7844da4543c53 100755 --- a/src/freedombone-restore-local +++ b/src/freedombone-restore-local @@ -967,7 +967,12 @@ function get_restore_app { backup_device="$1" -if [[ "$backup_device" == "detect" || "$backup_device" == "auto"* ]]; then +simple_backup= +if [[ "$backup_device" == "simple" || "$backup_device" == "detect" || "$backup_device" == "auto"* ]]; then + if [[ "$backup_device" == "simple" ]]; then + # shellcheck disable=SC2034 + simple_backup=1 + fi backup_device=$(detect_connected_drives) if [[ "$backup_device" != 'sd'* ]]; then echo $'No backup device was detected' diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 1f468c69cac6bd14058acd29ac86ed3f9f12c24a..70620e59958fbb181b0e847d463a6c4405ff916e 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -181,8 +181,11 @@ function backup_mount_drive { cryptsetup close encrypted_usb # mount the encrypted backup drive - if cryptsetup open --type luks "$USB_DRIVE" encrypted_usb; then - USB_DRIVE=/dev/mapper/encrypted_usb + # shellcheck disable=SC2154,SC2086 + if [ ! $simple_backup ]; then + if cryptsetup open --type luks "$USB_DRIVE" encrypted_usb; then + USB_DRIVE=/dev/mapper/encrypted_usb + fi fi if ! mount "$USB_DRIVE" "$USB_MOUNT"; then echo $"There was a problem mounting the USB drive to $USB_MOUNT"