"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/OSRelease.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.

OSRelease.pm  (Ocsinventory-Unix-Agent-2.6.1):OSRelease.pm  (Ocsinventory-Unix-Agent-2.8.0)
skipping to change at line 32 skipping to change at line 32
open V, "/etc/os-release" or warn; open V, "/etc/os-release" or warn;
foreach (<V>) { foreach (<V>) {
next if /^#/; next if /^#/;
$name = $1 if (/^NAME="?([^"]+)"?/); $name = $1 if (/^NAME="?([^"]+)"?/);
$version = $1 if (/^VERSION_ID="?([^"]+)"?/); $version = $1 if (/^VERSION_ID="?([^"]+)"?/);
$description=$1 if (/^PRETTY_NAME="?([^"]+)"?/); $description=$1 if (/^PRETTY_NAME="?([^"]+)"?/);
} }
close V; close V;
chomp($name); chomp($name);
# Debian version number is set in/etc/debian_version file
if (-r "/etc/debian_version") {
open V, "/etc/debian_version" or warn;
foreach (<V>) {
$version = $1 if ($_ =~ /^(\d+.*)/);
}
close V;
chomp($version);
}
$common->setHardware({ $common->setHardware({
OSNAME => $name, OSNAME => "$name $version",
OSVERSION => $version, OSVERSION => $version,
OSCOMMENTS => $description, OSCOMMENTS => $description,
}); });
} }
1; 1;
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added

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