zfs: print snapshots on activation
This commit is contained in:
parent
4c1f3e941d
commit
19e54ad0a6
1 changed files with 4 additions and 3 deletions
|
|
@ -249,9 +249,10 @@ in
|
|||
let
|
||||
recursiveFlag = lib.optionalString cfg.snapshotBeforeActivation.recursive "-r";
|
||||
in
|
||||
lib.concatMapStringsSep "\n" (ds: "zfs snapshot ${recursiveFlag} ${ds}@\"$name\"") (
|
||||
lib.uniqueStrings datasets
|
||||
)
|
||||
lib.concatMapStringsSep "\n" (ds: ''
|
||||
echo "Taking ZFS snapshot of ${ds}@$name"
|
||||
zfs snapshot ${recursiveFlag} ${ds}@"$name"
|
||||
'') (lib.uniqueStrings datasets)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue