diff options
author | Atemu <atemu.main@gmail.com> | 2022-10-22 19:52:10 +0200 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2022-10-22 20:00:56 +0200 |
commit | 7e2aec079c099f55b991b80356239076705d1bff (patch) | |
tree | af74384aea3ce9203be5b2b226490fb8db541859 /nixos/modules/tasks | |
parent | 104e8082de1b20f9d0e1f05b1028795ed0e0e4bc (diff) |
nixos/filesystems: escape mount options in fstab
Some mount options might include path names and those often contain spaces and therefore must be escaped. An example which prompted me to make this change is the path of a btrfs subvolume.
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/filesystems.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 994747601309c..ea825667c34fe 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -167,7 +167,7 @@ let else throw "No device specified for mount point ‘${fs.mountPoint}’.") + " " + escape (rootPrefix + fs.mountPoint) + " " + fs.fsType - + " " + builtins.concatStringsSep "," (fs.options ++ (extraOpts fs)) + + " " + escape (builtins.concatStringsSep "," (fs.options ++ (extraOpts fs))) + " " + (optionalString (!excludeChecks) ("0 " + (if skipCheck fs then "0" else if fs.mountPoint == "/" then "1" else "2"))) + "\n" |