mirror of
https://github.com/nix-community/disko.git
synced 2024-09-17 09:37:17 +03:00
zpool: fix default dataset getting shadowed
If the zpool's root dataset is not the rootfs and gets mounted on creation, the actual rootfs will get mounted later and shadow the current mountpoint. Running `zfs unmount` is the easiest way to unmount the zpool's root dataset on creation without messing up the value of the `mountpoint` setting.
This commit is contained in:
parent
4346558fd4
commit
9f9ff673d1
@ -67,6 +67,9 @@
|
||||
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \
|
||||
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \
|
||||
"''${zfs_devices[@]}"
|
||||
${lib.optionalString ((config.rootFsOptions.mountpoint or "") != "none") ''
|
||||
zfs unmount ${config.name}
|
||||
''}
|
||||
${lib.concatMapStrings (dataset: dataset._create) (lib.attrValues config.datasets)}
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user