diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2014-03-02 11:27:43 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-03-02 11:27:43 +0100 |
commit | d9cc648d6cf3a7990ff4d86a360b07cbce429a52 (patch) | |
tree | db3c1940dab744ffa80e70cce13dc2ce241fb09c /nixos | |
parent | cba5d36df1649d028bb6d6265c0ec90989147dfa (diff) | |
parent | a146fdab808ddacc2ea0b950d753807d75eae2db (diff) | |
download | nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.tar nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.tar.gz nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.tar.bz2 nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.tar.lz nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.tar.xz nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.tar.zst nixpkgs-d9cc648d6cf3a7990ff4d86a360b07cbce429a52.zip |
Merge pull request #1791 from wizeman/u/nixos-gen
nixos-generate-config: improve filesystem generation
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/installer/tools/nixos-generate-config.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index b6bc0458477..bf7cdcd3711 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -256,7 +256,7 @@ foreach my $fs (read_file("/proc/self/mountinfo")) { $mountPoint = "/" if $mountPoint eq ""; # Skip special filesystems. - next if in($mountPoint, "/proc") || in($mountPoint, "/dev") || in($mountPoint, "/sys") || in($mountPoint, "/run"); + next if in($mountPoint, "/proc") || in($mountPoint, "/dev") || in($mountPoint, "/sys") || in($mountPoint, "/run") || $mountPoint eq "/var/lib/nfs/rpc_pipefs"; # Skip the optional fields. my $n = 6; $n++ while $fields[$n] ne "-"; $n++; @@ -305,7 +305,15 @@ EOF fileSystems.\"$mountPoint\" = { device = \"$device\"; fsType = \"$fsType\"; - options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\"; +EOF + + if (scalar @extraOptions > 0) { + $fileSystems .= <<EOF; + options = \"${\join ",", uniq(@extraOptions)}\"; +EOF + } + + $fileSystems .= <<EOF; }; EOF |