nixos/znapzend: fix when no previous zetup
When the znapzend module was enabled for the first time with pure = true; then the list of previous entries is empty, but xargs still tried to execute a znapzendzetup delete command with no arguments, which made it fail
This commit is contained in:
parent
588fe10bae
commit
c2b8d14b56
|
@ -386,7 +386,7 @@ in
|
||||||
echo Resetting znapzend zetups
|
echo Resetting znapzend zetups
|
||||||
${pkgs.znapzend}/bin/znapzendzetup list \
|
${pkgs.znapzend}/bin/znapzendzetup list \
|
||||||
| grep -oP '(?<=\*\*\* backup plan: ).*(?= \*\*\*)' \
|
| grep -oP '(?<=\*\*\* backup plan: ).*(?= \*\*\*)' \
|
||||||
| xargs ${pkgs.znapzend}/bin/znapzendzetup delete
|
| xargs -I{} ${pkgs.znapzend}/bin/znapzendzetup delete "{}"
|
||||||
'' + concatStringsSep "\n" (mapAttrsToList (dataset: config: ''
|
'' + concatStringsSep "\n" (mapAttrsToList (dataset: config: ''
|
||||||
echo Importing znapzend zetup ${config} for dataset ${dataset}
|
echo Importing znapzend zetup ${config} for dataset ${dataset}
|
||||||
${pkgs.znapzend}/bin/znapzendzetup import --write ${dataset} ${config}
|
${pkgs.znapzend}/bin/znapzendzetup import --write ${dataset} ${config}
|
||||||
|
|
Loading…
Reference in New Issue