From: Bastian Dehn Date: Sun, 25 May 2025 07:30:35 +0000 (+0200) Subject: fix issues with backkup volume X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=ee9992a75e19afebb167bfd953f939d6adb798e2;p=simple-backup.git fix issues with backkup volume --- diff --git a/backupmount b/backupmount index bb8ab25..e7491ac 100755 --- a/backupmount +++ b/backupmount @@ -23,8 +23,8 @@ partition_mount() { local media="$1" local partition=$(cat config.yaml \ - | yq --raw-output ".media\"$media\".partition") - [ "$partition" == "null" ] \ + | yq --raw-output ".media.\"$media\".partition") + [ "$partition" != "null" ] \ || errlog "config.yaml partition for $media missing" \ || return $? [ -b "$partition" ] \ @@ -34,7 +34,7 @@ partition_mount() local backup_path=$(cat config.yaml \ | yq --raw-output ".backup_path") [ "$backup_path" == "null" ] \ - || errlog "config.yaml backup path missing" + || errlog "config.yaml backup path missing" \ || return $? infolog "backup path $backup_path" @@ -64,7 +64,7 @@ device_mount() || return $? infolog "use key $key" local volume=$(cat "config.yaml" \ - | yq --raw-output ".media.volume") + | yq --raw-output ".backup_volume") [ "$volume" != "null" ] \ || errlog "config.yaml volume for $media missing" \ || return $? @@ -73,7 +73,7 @@ device_mount() cryptsetup open --key-file "$key" \ "$device" \ "$volume" \ - || errlog "could not open $device with $key" + || errlog "could not open $device with $key" \ || return $? partition_mount "$media" || return $? @@ -108,7 +108,7 @@ umount() local backup_path=$(cat config.yaml \ | yq --raw-output ".backup_path") [ "$backup_path" == "null" ] \ - || errlog "config.yaml backup path missing" + || errlog "config.yaml backup path missing" \ || return $? infolog "umount backup path $backup_path" @@ -123,7 +123,7 @@ umount() infolog "close volume" local volume=$(cat "config.yaml" \ - | yq --raw-output ".media.volume") + | yq --raw-output ".backup_volume") [ "$volume" != "null" ] \ || errlog "config.yaml volume for $media missing" \ || return $?