summary refs log tree commit diff
path: root/nixos/modules/installer/tools/nixos-generate-config.pl
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-13 17:55:49 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-13 17:55:49 +0200
commitfd06533def4948b3f42ceded8df6e15892f82b78 (patch)
treef848dea06eeb2c20cadf422db1102988d44d7591 /nixos/modules/installer/tools/nixos-generate-config.pl
parentbaad6a62c9518c8c8c2d5a6e334adc0d3dd76210 (diff)
downloadnixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.tar
nixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.tar.gz
nixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.tar.bz2
nixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.tar.lz
nixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.tar.xz
nixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.tar.zst
nixpkgs-fd06533def4948b3f42ceded8df6e15892f82b78.zip
nixos-install: Don't barf if btrfs is missing
Diffstat (limited to 'nixos/modules/installer/tools/nixos-generate-config.pl')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl6
1 files 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 b768be6a3e0..a2dbe31e0d8 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 "/";