summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d0975b)
raw | patch | inline | side by side (parent: 3d0975b)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Sep 2008 12:44:37 +0000 (12:44 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Sep 2008 12:44:37 +0000 (12:44 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12476 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/server/events/gosaTriggered.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 715ef9ec9cefc7c8db95aea129f967a9e7815dbf..ca826949bf5d726bd8b37cb1b349ec577244efee 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
sub cleanup_and_extract {
- my $fileinfo = $repo_files{ $File::Find::name };
+ my $fileinfo = $repo_files{ $File::Find::name };
- if( defined $fileinfo ) {
+ if( defined $fileinfo ) {
+ my $dir = "$outdir/$fileinfo->{ 'dist' }/debconf.d";
+ my $sql;
+ my $package = $fileinfo->{ 'package' };
+ my $newver = $fileinfo->{ 'version' };
- my $dir = "$outdir/$fileinfo->{ 'dist' }/debconf.d";
- my $sql;
- my $package = $fileinfo->{ 'package' };
- my $newver = $fileinfo->{ 'version' };
-
- mkpath($dir);
- system( "dpkg -e '$File::Find::name' '$dir/DEBIAN'" );
+ mkpath($dir);
+ system( "dpkg -e '$File::Find::name' '$dir/DEBIAN'" );
if( -f "$dir/DEBIAN/templates" ) {
daemon_log("DEBUG: Found debconf templates in '$package' - $newver", 7);
- my $tmpl= "";
- {
+ my $tmpl= ""; {
local $/=undef;
open FILE, "$dir/DEBIAN/templates";
$tmpl = &encode_base64(<FILE>);
rmtree("$dir/DEBIAN/templates");
$sql= "update $main::packages_list_tn set template = '$tmpl' where package = '$package' and version = '$newver';";
- push @packages_list_statements, $sql;
+ push @packages_list_statements, $sql;
}
- }
+ }
- return;
+ return;
}
index 3607c0e7678d3817a151837d0beeb956dd98098c..e91aa4639d7eb7ab9ea45362e71116ccc038b3c0 100644 (file)
sub get_available_kernel {
- my ($msg, $msg_hash, $session_id) = @_;
-
- my $source = @{$msg_hash->{'source'}}[0];
- my $target = @{$msg_hash->{'target'}}[0];
- my $release= @{$msg_hash->{'release'}}[0];
-
- my @kernel;
- # Get Kernel packages for release
- my $sql_statement = "SELECT * FROM $main::packages_list_tn WHERE distribution='$release' AND package LIKE 'linux\-image\-%'";
- my $res_hash = $main::packages_list_db->select_dbentry($sql_statement);
- my %data;
- my $i=1;
-
- foreach my $package (keys %{$res_hash}) {
- $data{"answer".$i++}= $data{"answer".$i++}= ${$res_hash}{$package}->{'package'};
- }
- $data{"answer".$i++}= "default";
-
- my $out_msg = &build_msg("get_available_kernel", $target, $source, \%data);
- my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
- if (defined $forward_to_gosa) {
- $out_msg =~s/<\/xml>/<forward_to_gosa>$forward_to_gosa<\/forward_to_gosa><\/xml>/;
- }
-
- return ( $out_msg );
+ my ($msg, $msg_hash, $session_id) = @_;
+
+ my $source = @{$msg_hash->{'source'}}[0];
+ my $target = @{$msg_hash->{'target'}}[0];
+ my $fai_release= @{$msg_hash->{'fai_release'}}[0];
+
+ my @kernel;
+ # Get Kernel packages for release
+ my $sql_statement = "SELECT * FROM $main::packages_list_tn WHERE distribution='$fai_release' AND package LIKE 'linux\-image\-%'";
+ my $res_hash = $main::packages_list_db->select_dbentry($sql_statement);
+ my %data;
+ my $i=1;
+
+ foreach my $package (keys %{$res_hash}) {
+ $data{"answer".$i++}= $data{"answer".$i++}= ${$res_hash}{$package}->{'package'};
+ }
+ $data{"answer".$i++}= "default";
+
+ my $out_msg = &build_msg("get_available_kernel", $target, $source, \%data);
+ my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
+ if (defined $forward_to_gosa) {
+ $out_msg =~s/<\/xml>/<forward_to_gosa>$forward_to_gosa<\/forward_to_gosa><\/xml>/;
+ }
+
+ return ( $out_msg );
}