From 400d8b728ca344f9d3ef297267757be34edfa0ec Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 24 May 2025 23:39:16 +0200 Subject: [PATCH] rcopy.conf.sample: The backup script now determines itself whether the backup hard drive is encrypted or not. --- conf/rcopy.conf.sample | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/conf/rcopy.conf.sample b/conf/rcopy.conf.sample index 8fd9aca..29fff4e 100644 --- a/conf/rcopy.conf.sample +++ b/conf/rcopy.conf.sample @@ -86,12 +86,7 @@ backup_partition= disk_identifier= _found=false -if $crypto_backup_device ; then - - backup_raw_partition=$_backup_partition - backup_partition="/dev/mapper/${backup_partition_name}" - -elif $extern_usb_disk || $extern_sata_disk || $intern_disk ; then +if $extern_usb_disk || $extern_sata_disk || $intern_disk ; then ## - In case of unencrypted (and labeled) extern backup disc ## - @@ -115,10 +110,20 @@ elif $extern_usb_disk || $extern_sata_disk || $intern_disk ; then ## - Backup device could not be detected, so we will try the (above) given one.. ## - - backup_partition=$_backup_partition + backup_raw_partition=$_backup_partition + #backup_partition=$_backup_partition else - backup_partition=/dev/$disk_identifier + backup_raw_partition=/dev/$disk_identifier + #backup_partition=/dev/$disk_identifier + fi + + if $(cryptsetup isLuks $backup_raw_partition) ; then + crypto_backup_device=true + backup_partition="/dev/mapper/${backup_partition_name}" + else + crypto_backup_device=false + backup_partition=$backup_raw_partition fi fi