Print a sensible error message if no device is specified for a filesystem

This commit is contained in:
Eelco Dolstra 2014-07-30 13:10:03 +02:00
parent b1ba1689bd
commit 94ce6ec866

View File

@ -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