nixos-generate-config: Skip FUSE filesystems
I don't know how to recover that a FUSE filesystem is (say) ntfs-3g.
This commit is contained in:
parent
984921e657
commit
57804f44ec
@ -248,8 +248,8 @@ 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\";
|
||||
fileSystems.\"$mountPoint\" =
|
||||
{ device = \"$fsByDev{$fields[2]}$path\";
|
||||
fsType = \"none\";
|
||||
options = \"bind\";
|
||||
};
|
||||
@ -257,6 +257,13 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
|
||||
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,10 +278,9 @@ EOF
|
||||
}
|
||||
|
||||
# Emit the filesystem.
|
||||
$fsByDev{$fields[2]} = $mountPoint;
|
||||
$fileSystems .= <<EOF;
|
||||
fileSystems.\"$mountPoint\" = {
|
||||
device = \"$device\";
|
||||
fileSystems.\"$mountPoint\" =
|
||||
{ device = \"$device\";
|
||||
fsType = \"$fsType\";
|
||||
options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user