Fix some errors determin backup device.
This commit is contained in:
parent
58d1db64b9
commit
e66c1e0479
@ -89,13 +89,13 @@ 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
|
||||
elif $extern_usb_disk || $extern_sata_disk || $intern_disk ; then
|
||||
|
||||
## - In case of unencrypted (and labeled) extern backup disc
|
||||
## -
|
||||
if [ -d "/dev/disk/by-label" ]; then
|
||||
backup_partition=$(realpath /dev/disk/by-label/`ls /dev/disk/by-label | grep $base_label_name`)
|
||||
[[ "X" != "X$backup_partition" ]] && _found=true
|
||||
backup_partition=$(realpath /dev/disk/by-label/`ls /dev/disk/by-label | grep -i $base_label_name`)
|
||||
[[ "X${backup_partition}" != "X$(realpath /dev/disk/by-label/)" ]] && _found=true
|
||||
fi
|
||||
|
||||
## - Otherwise, assuming the backup disc is the alphabetic last attached device
|
||||
|
6
rcopy.sh
6
rcopy.sh
@ -165,12 +165,12 @@ if $extern_usb_disk || $extern_sata_disk || $intern_disk ; then
|
||||
|
||||
elif ! $(df -h | grep $backup_partition | grep -q $backup_mountpoint 2> /dev/null) ; then
|
||||
|
||||
msg="[ Warning ]: Backup Partition is mounted, but mount point differs from script defined one ($backup_mountpoint)."
|
||||
msg="[ Warning ]: Backup Partition '${backup_partition}' is mounted, but mount point differs from script defined one ($backup_mountpoint)."
|
||||
msg="$msg\n Try to unmount partitionn and mount it again.."
|
||||
if $MANUAL ; then
|
||||
echo -e "\n$msg\n"
|
||||
fi
|
||||
echolog "\n[ Warning ]: Backup Partition is mounted, but mount point differs from script defined one
|
||||
echolog "\n[ Warning ]: Backup Partition \033[1m${backup_partition}\033[mis mounted, but mount point differs from script defined one
|
||||
which is '$backup_mountpoint'.\n\n Try to unmount partition and mount it again.."
|
||||
|
||||
$umount $backup_partition > /dev/null 2>&1
|
||||
@ -211,7 +211,7 @@ if $extern_usb_disk || $extern_sata_disk || $intern_disk ; then
|
||||
|
||||
elif ! $(df -h | grep $backup_partition | grep -q $backup_mountpoint 2> /dev/null) ; then
|
||||
|
||||
msg="[ Error ]: Backup Partition is mounted, but mount point differs from script defined one ($backup_mountpoint)."
|
||||
msg="[ Error ]: Backup Partition '${backup_partition}' is mounted, but mount point differs from script defined one ($backup_mountpoint)."
|
||||
if $MANUAL ; then
|
||||
echo -e "\n$msg\n"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user