From 87b6232f3a4c9903a432fffd8bc627f2c445a10d Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sat, 30 Aug 2014 16:30:56 -0700 Subject: [PATCH] nixos/generate-config: Don't interpret btrfs subvols as bind mounts --- .../installer/tools/nixos-generate-config.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index ab5b2954f6b5..c6f499b82506 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -22,7 +22,7 @@ sub uniq { sub runCommand { my ($cmd) = @_; - open FILE, "$cmd 2>/dev/null |" or die "Failed to execute: $cmd\n"; + open FILE, "$cmd 2>&1 |" or die "Failed to execute: $cmd\n"; my @ret = ; close FILE; return ($?, @ret); @@ -311,10 +311,13 @@ 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 .= <