Print a sensible error message if no device is specified for a filesystem
This commit is contained in:
parent
b1ba1689bd
commit
94ce6ec866
@ -146,7 +146,9 @@ in
|
||||
|
||||
# Filesystems.
|
||||
${flip concatMapStrings fileSystems (fs:
|
||||
(if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}")
|
||||
(if fs.device != null then fs.device
|
||||
else if fs.label != null then "/dev/disk/by-label/${fs.label}"
|
||||
else throw "No device specified for mount point ‘${fs.mountPoint}’.")
|
||||
+ " " + fs.mountPoint
|
||||
+ " " + fs.fsType
|
||||
+ " " + fs.options
|
||||
|
Loading…
Reference in New Issue
Block a user