Commit cf12e7a6 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5721-support-inheriting-localboots-from-group' into 'argonaut-1.3-dev'

Resolve "Support inheriting localboots from group"

See merge request argonaut/argonaut!72
parents 969ac12d 2d81620f
......@@ -748,7 +748,7 @@ sub argonaut_get_generic_settings {
my $mesgGroup = $ldap->search( # Get the group object
base => $ldap_base,
filter => "(&(objectClass=$objectClass)(member=$dn))",
attrs => [values(%{$params}), 'argonautDeploymentTimeframe']
attrs => \@attrs
);
if (scalar($mesgGroup->entries) == 1) {
......
......@@ -87,6 +87,28 @@ sub get_opsi_settings {
@_
);
$settings->{client} = 1;
if ($settings->{'profile-dn'} eq 'inherited') {
if (not exists $settings->{'group'}->{'profile-dn'}) {
die "Profile set to inherited but could no find group OPSI profile\n";
}
if (not exists $settings->{'group'}->{'server-dn'}) {
die "Profile set to inherited but could no find group OPSI server\n";
}
$settings->{'profile-dn'} = $settings->{'group'}->{'profile-dn'};
$settings->{'server-dn'} = $settings->{'group'}->{'server-dn'};
}
if ($settings->{'server-dn'} eq 'inherited') {
$settings->{'server-dn'} = $settings->{'group'}->{'server-dn'};
}
if ((defined $settings->{'inherit-softs'}) && ($settings->{'inherit-softs'} eq 'TRUE') && (defined $settings->{'group'}->{'softs'})) {
if (defined $settings->{'softs'}) {
push(@{$settings->{'softs'}}, @{$settings->{'group'}->{'softs'}});
} else {
$settings->{'softs'} = $settings->{'group'}->{'softs'};
}
}
};
if ($@) { #catch
my $error = $@;
......@@ -107,29 +129,6 @@ sub get_opsi_settings {
};
};
if ((defined $settings->{'profile-dn'}) && ($settings->{'profile-dn'} eq 'inherited')) {
if (not exists $settings->{'group'}->{'profile-dn'}) {
die "Profile set to inherited but could no find group OPSI profile\n";
}
if (not exists $settings->{'group'}->{'server-dn'}) {
die "Profile set to inherited but could no find group OPSI server\n";
}
$settings->{'profile-dn'} = $settings->{'group'}->{'profile-dn'};
$settings->{'server-dn'} = $settings->{'group'}->{'server-dn'};
}
if ((defined $settings->{'server-dn'}) && ($settings->{'server-dn'} eq 'inherited')) {
$settings->{'server-dn'} = $settings->{'group'}->{'server-dn'};
}
if ((defined $settings->{'inherit-softs'}) && ($settings->{'inherit-softs'} eq 'TRUE') && (defined $settings->{'group'}->{'softs'})) {
if (defined $settings->{'softs'}) {
push(@{$settings->{'softs'}}, @{$settings->{'group'}->{'softs'}});
} else {
$settings->{'softs'} = $settings->{'group'}->{'softs'};
}
}
my ($ldap, $ldap_base) = argonaut_ldap_handle($main::config);
if (not defined $settings->{'server-uri'}) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment