From: janw Date: Tue, 16 Sep 2008 12:44:37 +0000 (+0000) Subject: Reflect column name change. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=72c800a4aa60027d92dd08875bb1b747ed7c7f68;p=gosa.git Reflect column name change. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12476 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 715ef9ec9..ca826949b 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -3003,24 +3003,22 @@ sub store_fileinfo { 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(); @@ -3029,11 +3027,11 @@ sub cleanup_and_extract { 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; } diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index 3607c0e76..e91aa4639 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -755,31 +755,31 @@ sub trigger_action_wake { 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><\/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><\/xml>/; + } + + return ( $out_msg ); }