From 25135b64e549e129914b9b5dfb74ca2011ee3d5d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 5 Jul 2024 15:32:49 +0200 Subject: backup-partition: check that target is inactive --- backup-partition.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup-partition.rsc b/backup-partition.rsc index 211db0f..34cdc8f 100644 --- a/backup-partition.rsc +++ b/backup-partition.rsc @@ -60,10 +60,10 @@ } :local FallbackToName [ /partitions/get $ActiveRunning fallback-to ]; - :local FallbackTo [ /partition/find where name=$FallbackToName ]; + :local FallbackTo [ /partition/find where name=$FallbackToName !active ]; :if ([ :len $FallbackTo ] < 1) do={ - $LogPrint error $ScriptName ("There is no partition with name '" . $FallbackToName . "'."); + $LogPrint error $ScriptName ("There is no inactive partition named '" . $FallbackToName . "'."); :set PackagesUpdateBackupFailure true; :error false; } -- cgit v1.2.3-70-g09d2