nixos-generate-config: account for mount points & devices with spaces & tabs in the name (#50234)

This commit is contained in:
aanderse
2019-02-03 14:33:31 +01:00
committed by Timo Kaufmann
parent 4a394e4150
commit c01eeda8e9
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ in
fsToSkipCheck = [ "none" "bindfs" "btrfs" "zfs" "tmpfs" "nfs" "vboxsf" "glusterfs" ];
skipCheck = fs: fs.noCheck || fs.device == "none" || builtins.elem fs.fsType fsToSkipCheck;
# https://wiki.archlinux.org/index.php/fstab#Filepath_spaces
escape = string: builtins.replaceStrings [ " " ] [ "\\040" ] string;
escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string;
in ''
# This is a generated file. Do not edit!
#