summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa7b194)
raw | patch | inline | side by side (parent: aa7b194)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Feb 2008 14:42:17 +0000 (14:42 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Feb 2008 14:42:17 +0000 (14:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8784 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/modules/SIPackages.pm | patch | blob | history | |
gosa-si/modules/Utils.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index a56d548916d151d359450da6e10174d3a69baf66..d4e17c29f187f21dbe6cbc92efe4b16b76c7e468 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
my $goto_secret;
my $admin_base= "";
my $department= "";
+ my $release= "";
my $unit_tag;
# Transform input into array
$unit_tag= $element;
next;
}
+ if ($key =~ /^release$/) {
+ $release= $element;
+ next;
+ }
}
}
print file1 "LDAP_BASE=\"$ldap_base\"\n";
print file1 "ADMIN_BASE=\"$admin_base\"\n";
print file1 "DEPARTMENT=\"$department\"\n";
+ print file1 "RELEASE=\"$release\"\n";
print file1 "UNIT_TAG=\"".(defined $unit_tag ? "$unit_tag" : "")."\"\n";
print file1 "UNIT_TAG_FILTER=\"".(defined $unit_tag ? "(gosaUnitTag=$unit_tag)" : "")."\"\n";
close(file1);
index fa4d03fd5b948e8200649f76c8ca88446aff6da4..22e052455cc08decb1db929d8e637f3e7c64b5ba 100644 (file)
# Find admin base and department name
$mesg = $ldap->search( base => $ldap_base,
scope => 'sub',
- attrs => ['dn', 'ou'],
+ attrs => ['dn', 'ou', 'FAIclass'],
filter => "(&(objectClass=gosaAdministrativeUnit)(gosaUnitTag=$unit_tag))");
#$mesg->code && die $mesg->error;
if($mesg->code) {
$data{'admin_base'}= $entry->dn;
$data{'department'}= $entry->get_value("ou");
+ # Fill release if available
+ my $ou= $entry->get_value("ou");
+ if (defined $ou && $ou ~= /^.* :([A-Za-z0-9/.]+).*$/){
+ $data{'release'}= $1;
+ }
+
# Append unit Tag
$data{'unit_tag'}= $unit_tag;
}
$entry->add("objectClass" => "goHard");
$entry->add("cn" => $cn);
$entry->add("macAddress" => $macaddress);
+ $entry->add("gotomode" => "locked");
$entry->add("gotoSysStatus" => "new-system");
$entry->add("ipHostNumber" => $ipaddress);
if(my $res=$entry->update($ldap)) {
index a5c90d9e4ce36f110c996ad56f9fcff281fec671..d5954dd9d993d19bd8c19a8d37ce4ef5cdd7fba9 100644 (file)
--- a/gosa-si/modules/Utils.pm
+++ b/gosa-si/modules/Utils.pm
%result = ( 'status' => 0, 'percent' => 16, 'task' => "task_instsoft",
'action' => gettext("Gathering information for package lists"));
} elsif ( $line =~ /([0-9]+) packages upgraded, ([0-9]+) newly installed/ ) {
- $pkg_step= 69.0 / ($1 + $2) / 3.0;
+ if (($1 + $2) != 0){
+ $pkg_step= 69.0 / ($1 + $2) / 3.0;
+ }
$percent= 16.0;
} elsif ( $line =~ /Get:[0-9]+ [^ ]+ [^ ]+ ([^ ]+)/ ) {
$percent+= $pkg_step;