From 7ba1682c051fe101bfbdfdef69fc15470c3013c0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 10 Jan 2007 13:58:48 +0000 Subject: [PATCH] * In fileSystems: say `label = "FOO"' instead of `device = "LABEL=foo"'. svn path=/nixos/trunk/; revision=7611 --- system/options.nix | 8 ++++++++ upstart-jobs/filesystems.nix | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/system/options.nix b/system/options.nix index 5828beb097d..03ef575f437 100644 --- a/system/options.nix +++ b/system/options.nix @@ -193,6 +193,9 @@ fsType = "ext3"; options = "data=journal"; } + { mountPoint = "/bigdisk"; + label = "bigdisk"; + } ]; description = " The file systems to be mounted. It must include an entry for @@ -205,6 +208,11 @@ \"auto\"), and options (the mount options passed to mount using the flag; defaults to \"defaults\"). + + Instead of specifying device, you can also + specify a volume label (volume) for file + systems that support it, such as ext2/ext3 (see mke2fs + -L). "; } diff --git a/upstart-jobs/filesystems.nix b/upstart-jobs/filesystems.nix index 23849db7886..793bb47ba25 100644 --- a/upstart-jobs/filesystems.nix +++ b/upstart-jobs/filesystems.nix @@ -4,7 +4,7 @@ let # !!! use XML mountPoints = map (fs: fs.mountPoint) fileSystems; - devices = map (fs: fs.device) fileSystems; + devices = map (fs: if fs ? device then fs.device else "LABEL=" + fs.label) fileSystems; fsTypes = map (fs: if fs ? fsType then fs.fsType else "auto") fileSystems; optionss = map (fs: if fs ? options then fs.options else "defaults") fileSystems;