diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-11 17:24:30 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-13 17:35:56 +0200 |
commit | 57804f44ec2068f74f0b79a090adce99a75a92fc (patch) | |
tree | dbab861b9ba6fca057f44c6cfb9897cf4a00e959 /nixos | |
parent | 984921e657e4e7b0bde19a7b9c4c32e291399839 (diff) | |
download | nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.tar nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.tar.gz nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.tar.bz2 nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.tar.lz nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.tar.xz nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.tar.zst nixlib-57804f44ec2068f74f0b79a090adce99a75a92fc.zip |
nixos-generate-config: Skip FUSE filesystems
I don't know how to recover that a FUSE filesystem is (say) ntfs-3g.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/installer/tools/nixos-generate-config.pl | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 0f72f94fd35c..9ce2cab79b0b 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -248,15 +248,22 @@ foreach my $fs (read_file("/proc/self/mountinfo")) { if (defined $fsByDev{$fields[2]}) { my $path = $fields[3]; $path = "" if $path eq "/"; $fileSystems .= <<EOF; - fileSystems.\"$mountPoint\" = { - device = \"$fsByDev{$fields[2]}$path\"; - fsType = \"none\"; - options = \"bind\"; - }; + fileSystems.\"$mountPoint\" = + { device = \"$fsByDev{$fields[2]}$path\"; + fsType = \"none\"; + options = \"bind\"; + }; EOF next; } + $fsByDev{$fields[2]} = $mountPoint; + + # We don't know how to handle FUSE filesystems. + if ($fsType eq "fuseblk" || $fsType eq "fuse") { + print STDERR "warning: don't know how to emit ‘fileSystem’ option for FUSE filesystem ‘$mountPoint’\n"; + next; + } # Is this a mount of a loopback device? my @extraOptions; @@ -271,13 +278,12 @@ EOF } # Emit the filesystem. - $fsByDev{$fields[2]} = $mountPoint; $fileSystems .= <<EOF; - fileSystems.\"$mountPoint\" = { - device = \"$device\"; - fsType = \"$fsType\"; - options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\"; - }; + fileSystems.\"$mountPoint\" = + { device = \"$device\"; + fsType = \"$fsType\"; + options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\"; + }; EOF } |