From 4b7c606589be8440c982dc19bc9497b13e82abce Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 8 May 2014 21:02:40 +0200 Subject: [PATCH] nixos-generator-config: Don't emit a double / in bind mounts --- nixos/modules/installer/tools/nixos-generate-config.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index d54539edfa3b..ab058efc7094 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -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 .= <