Updated Storage->manage_lvm_conf() to only run on EL8.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 11 months ago
parent 14022896aa
commit 423f677716
  1. 14
      Anvil/Tools/Storage.pm

@ -3232,6 +3232,8 @@ fi;";
=head2 manage_lvm_conf
B<< Note >>: This only works on EL8. If used on another distro, this method will return without actually doing anything.
This method configures C<< lvm.conf >> to add the C<< filter = [ ... ] >> to ensure DRBD devices aren't scanned.
If there was a problem, C<< 1 >> is returned. Otherwise, C<< 0 >> is returned.
@ -3274,6 +3276,18 @@ sub manage_lvm_conf
target => $target,
}});
### NOTE: Only add the filter on EL8 machines.
my ($os_type, $os_arch) = $anvil->Get->os_type({debug => $debug});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
os_type => $os_type,
os_arch => $os_arch,
}});
if ($os_type !~ /\D8/)
{
# Not EL8, return
return(0);
}
my $body = $anvil->Storage->read_file({
debug => $debug,
file => $anvil->data->{path}{configs}{'lvm.conf'},

Loading…
Cancel
Save