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?
|
# Maybe this is a bind-mount of a filesystem we saw earlier?
|
||||||
if (defined $fsByDev{$fields[2]}) {
|
if (defined $fsByDev{$fields[2]}) {
|
||||||
my $path = $fields[3]; $path = "" if $path eq "/";
|
my $path = $fields[3]; $path = "" if $path eq "/";
|
||||||
|
my $base = $fsByDev{$fields[2]};
|
||||||
|
$base = "" if $base eq "/";
|
||||||
$fileSystems .= <<EOF;
|
$fileSystems .= <<EOF;
|
||||||
fileSystems.\"$mountPoint\" =
|
fileSystems.\"$mountPoint\" =
|
||||||
{ device = \"$fsByDev{$fields[2]}$path\";
|
{ device = \"$base$path\";
|
||||||
fsType = \"none\";
|
fsType = \"none\";
|
||||||
options = \"bind\";
|
options = \"bind\";
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user