Skip to content

Commit

Permalink
Fix for when btrfs device was used as boot device, the variable neces…
Browse files Browse the repository at this point in the history
…sary for the grub script would not be set.
  • Loading branch information
KerimG authored and Thomas Lange committed Sep 15, 2016
1 parent 9624061 commit 57760d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/setup-storage/Fstab.pm
Expand Up @@ -171,7 +171,7 @@ sub find_boot_mnt_point {
}
} elsif ($c eq "BTRFS") {
foreach my $b (keys %{ $config{$c}->{volumes}}) {
my $this_mp = $config{$c}->{volumes}->{mountpoint};
my $this_mp = $config{$c}->{volumes}->{$b}->{mountpoint};
next if (!defined($this_mp));
return $this_mp if ($this_mp eq "/boot");
$mnt_point = $this_mp if ($this_mp eq "/");
Expand Down Expand Up @@ -304,6 +304,9 @@ sub generate_fstab {
# skip entries without a mountpoint
next if ( $config->{$c}->{volumes}->{$v}->{mountpoint} eq "-");

$FAI::disk_var{BOOT_DEVICE} = (keys $config->{$c}->{volumes}->{$v}->{devices})[0]
if ( $config->{$c}->{volumes}->{$v}->{mountpoint} eq $boot_mnt_point);

# get an array of devices that are part of the BTRFS RAID configuration
my @device_names = keys %{ $config->{$c}->{volumes}->{$v}->{devices}};
my $name_string = join(".", @device_names);
Expand Down

0 comments on commit 57760d4

Please sign in to comment.