From f2fd48e131025395a9a20e35496a76a2dc1d27b6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Apr 2012 21:21:00 +0000 Subject: [PATCH] * Fix the "autocreate" option. svn path=/nixos/trunk/; revision=33750 --- modules/tasks/filesystems.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/tasks/filesystems.nix b/modules/tasks/filesystems.nix index 739d63bf479..557c5873d94 100644 --- a/modules/tasks/filesystems.nix +++ b/modules/tasks/filesystems.nix @@ -185,6 +185,12 @@ in # Ensure that this job is restarted when fstab changed: # ${fstab} echo "mounting filesystems..." + + # Create missing mount points. Note that this won't work + # if the mount point is under another mount point. + ${flip concatMapStrings config.fileSystems (fs: optionalString fs.autocreate '' + mkdir -p -m 0755 '${fs.mountPoint}' + '')} ''; daemonType = "daemon";