summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f819f96)
raw | patch | inline | side by side (parent: f819f96)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 15:43:49 +0000 (15:43 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 15:43:49 +0000 (15:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9085 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/SIPackages.pm | patch | blob | history |
index 64c72c0a36f0c3a4905a8df6b0ff164159b847b9..7812d63f6072697401fd2eac73e55dbad4e95a01 100644 (file)
# Perform search
$mesg = $ldap->search( base => $ldap_base,
scope => 'sub',
- attrs => ['dn', 'gotoLdapServer', 'gosaUnitTag'],
+ attrs => ['dn', 'gotoLdapServer', 'gosaUnitTag', 'FAIclass'],
filter => "(&(objectClass=GOhard)(macaddress=$macaddress))");
#$mesg->code && die $mesg->error;
if($mesg->code) {
my @ldap_uris;
my $server;
my $base;
+ my $release;
+
+ # Fill release if available
+ my $FAIclass= $entry->get_value("FAIclass");
+ if (defined $FAIclass && $FAIclass =~ /^.* :([A-Za-z0-9\/.]+).*$/) {
+ $release= $1;
+ }
# Do we need to look at an object class?
if (length(@servers) < 1){
$mesg = $ldap->search( base => $ldap_base,
scope => 'sub',
- attrs => ['dn', 'gotoLdapServer'],
+ attrs => ['dn', 'gotoLdapServer', 'FAIclass'],
filter => "(&(objectClass=gosaGroupOfNames)(member=$dn))");
#$mesg->code && die $mesg->error;
if($mesg->code) {
$entry= $mesg->entry(0);
$dn= $entry->dn;
@servers= $entry->get_value("gotoLdapServer");
+
+ if (not defined $release){
+ $FAIclass= $entry->get_value("FAIclass");
+ if (defined $FAIclass && $FAIclass =~ /^.* :([A-Za-z0-9\/.]+).*$/) {
+ $release= $1;
+ }
+ }
}
@servers= sort (@servers);
# Assemble data package
my %data = ( 'ldap_uri' => \@ldap_uris, 'ldap_base' => $base,
'ldap_cfg' => \@ldap_cfg, 'pam_cfg' => \@pam_cfg,'nss_cfg' => \@nss_cfg );
+ if (defined $release){
+ $data{'release'}= $release;
+ }
# Need to append GOto settings?
if (defined $goto_admin and defined $goto_secret){
# Find admin base and department name
$mesg = $ldap->search( base => $ldap_base,
scope => 'sub',
- attrs => ['dn', 'ou', 'FAIclass'],
+ attrs => ['dn', 'ou'],
filter => "(&(objectClass=gosaAdministrativeUnit)(gosaUnitTag=$unit_tag))");
#$mesg->code && die $mesg->error;
if($mesg->code) {
$data{'unit_tag'}= $unit_tag;
}
- # Fill release if available
- my $FAIclass= $entry->get_value("FAIclass");
- if (defined $FAIclass && $FAIclass =~ /^.* :([A-Za-z0-9\/.]+).*$/) {
- $data{'release'}= $1;
- }
-
# Unbind
$mesg = $ldap->unbind;