nixos-generator-config: Don't emit a double / in bind mounts
This commit is contained in:
parent
dc78ae327c
commit
4b7c606589
@ -305,9 +305,11 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
|
||||
# Maybe this is a bind-mount of a filesystem we saw earlier?
|
||||
if (defined $fsByDev{$fields[2]}) {
|
||||
my $path = $fields[3]; $path = "" if $path eq "/";
|
||||
my $base = $fsByDev{$fields[2]};
|
||||
$base = "" if $base eq "/";
|
||||
$fileSystems .= <<EOF;
|
||||
fileSystems.\"$mountPoint\" =
|
||||
{ device = \"$fsByDev{$fields[2]}$path\";
|
||||
{ device = \"$base$path\";
|
||||
fsType = \"none\";
|
||||
options = \"bind\";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user