diff options
-rw-r--r-- | nixos/modules/installer/tools/nixos-generate-config.pl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index cabdb09ec9c18..73dd87cef5cf2 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -344,19 +344,19 @@ EOF } } - # Is this a btrfs filesystem? - if ($fsType eq "btrfs") { - my ($status, @info) = runCommand("btrfs subvol show $rootDir$mountPoint"); - if ($status != 0) { - die "Failed to retreive subvolume info for $mountPoint"; - } - my @subvols = join("", @info) =~ m/Name:[ \t\n]*([^ \t\n]*)/; - if ($#subvols > 0) { - die "Btrfs subvol name for $mountPoint listed multiple times in mount\n" - } elsif ($#subvols == 0) { - push @extraOptions, "subvol=$subvols[0]"; - } - } + # Is this a btrfs filesystem? + if ($fsType eq "btrfs") { + my ($status, @info) = runCommand("btrfs subvol show $rootDir$mountPoint"); + if ($status != 0) { + die "Failed to retreive subvolume info for $mountPoint"; + } + my @subvols = join("", @info) =~ m/Name:[ \t\n]*([^ \t\n]*)/; + if ($#subvols > 0) { + die "Btrfs subvol name for $mountPoint listed multiple times in mount\n" + } elsif ($#subvols == 0) { + push @extraOptions, "subvol=$subvols[0]"; + } + } # Emit the filesystem. $fileSystems .= <<EOF; |