forked from mirrors/nixpkgs
stage-1 module: remove check that swap device has a label
All swap device option sets "have" a label, it's just that sometimes it's undefined. Because we set a `device` attribute when we have a label anyway it's ok to just check device prefix. Fixes #18891.
This commit is contained in:
parent
e80b22369d
commit
a63ca1bf3d
|
@ -198,9 +198,10 @@ let
|
|||
preLVMCommands preDeviceCommands postDeviceCommands postMountCommands preFailCommands kernelModules;
|
||||
|
||||
resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}")
|
||||
(filter (sd: (sd ? label || hasPrefix "/dev/" sd.device) && !sd.randomEncryption
|
||||
# Don't include zram devices
|
||||
&& !(hasPrefix "/dev/zram" sd.device)) config.swapDevices);
|
||||
(filter (sd: hasPrefix "/dev/" sd.device && !sd.randomEncryption
|
||||
# Don't include zram devices
|
||||
&& !(hasPrefix "/dev/zram" sd.device)
|
||||
) config.swapDevices);
|
||||
|
||||
fsInfo =
|
||||
let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType (builtins.concatStringsSep "," fs.options) ];
|
||||
|
|
Loading…
Reference in a new issue