"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Modules/Download.pm" between
Ocsinventory-Unix-Agent-2.6.1.tar.gz and Ocsinventory-Unix-Agent-2.8.0.tar.gz

About: Ocsinventory-Agent is a Linux agent for OCS Inventory NG.

Download.pm  (Ocsinventory-Unix-Agent-2.6.1):Download.pm  (Ocsinventory-Unix-Agent-2.8.0)
skipping to change at line 369 skipping to change at line 369
$logger->debug('Found a suspend file... Will wait 10 seconds before retry'); $logger->debug('Found a suspend file... Will wait 10 seconds before retry');
sleep(10); sleep(10);
next; next;
} }
$end = 1; $end = 1;
#TODO Uncomment this line #undef $packages; #TODO Uncomment this line #undef $packages;
# Reading configuration # Reading configuration
open FH, "$dir/config" or die("Cannot read config file: $!"); open FH, "$dir/config";
if (flock(FH, LOCK_SH)){ if (flock(FH, LOCK_SH)){
$download_config = XMLin("$dir/config"); $download_config = XMLin("$dir/config");
close(FH); close(FH);
# If Frag latency is null, download is off # If Frag latency is null, download is off
if ($download_config->{'ON'} eq '0'){ if ($download_config->{'ON'} eq '0'){
$logger->info("Option turned off. Exiting."); $logger->info("Option turned off. Exiting.");
finish($logger, $context); finish($logger, $context);
} }
} else { } else {
$logger->error("Cannot read config file :-( . Exiting.");
close(FH); close(FH);
if (-e "$dir/config") {
$logger->error("Cannot read config file :-( . Exiting.");
} else {
$logger->debug("Download not configured");
}
finish($logger, $context); finish($logger, $context);
} }
# Retrieving packages to download and their priority # Retrieving packages to download and their priority
while (my $entry = readdir(DIR)){ while (my $entry = readdir(DIR)){
next if $entry !~ /^\d+$/; next if $entry !~ /^\d+$/;
next unless(-d $entry); next unless(-d $entry);
# Clean package if info file does not still exist # Clean package if info file does not still exist
unless(-e "$entry/info"){ unless(-e "$entry/info"){
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)