From fd06533def4948b3f42ceded8df6e15892f82b78 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 13 Jul 2015 17:55:49 +0200 Subject: [PATCH] nixos-install: Don't barf if btrfs is missing --- nixos/modules/installer/tools/nixos-generate-config.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index b768be6a3e01..a2dbe31e0d8d 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -311,9 +311,9 @@ 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]}) { - # Make sure this isn't a btrfs subvolume - my ($status, @msg) = runCommand("btrfs subvol show $rootDir$mountPoint"); - if (join("", @msg) =~ /ERROR:/) { + # Make sure this isn't a btrfs subvolume. + my $msg = `btrfs subvol show $rootDir$mountPoint`; + if ($? != 0 || $msg =~ /ERROR:/s) { my $path = $fields[3]; $path = "" if $path eq "/"; my $base = $fsByDev{$fields[2]}; $base = "" if $base eq "/";