Project

General

Profile

Bug #3837 ยป rudder-agent-2.7.0-FI-OL-SL-support.patch

Olivier Mauras, 2013-08-14 13:59

View differences:

Input/Linux/Distro/LSB.pm
use FusionInventory::Agent::Tools;
sub isEnabled {
return canRun('lsb_release');
# Only use lsb_release if not on Oracle Linux
return canRun('lsb_release') && unless(-f '/etc/oracle-release');
}
sub doInventory {
Input/Linux/Distro/NonLSB.pm
# centos-release contains something like "CentOS Linux release 6.0 (Final)
[ '/etc/centos-release', 'CentOS', 'release ([\d.]+)', '%s' ],
# system-release contains something like "Scientific Linux release 6.4 (Carbon)"
[ '/etc/system-release', 'Scientific', 'release ([\d.]+)', '%s' ],
# oracle-release contains something like "Oracle Linux Server release 5.9"
[ '/etc/oracle-release', 'Oracle', 'release ([\d.]+)', '%s' ],
# redhat-release contains something like "Red Hat Enterprise Linux Server release 5 (Tikanga)"
[ '/etc/redhat-release', 'RedHat', 'release ([\d.]+)', '%s' ],
......
["FusionInventory::Agent::Task::Inventory::Input::Linux::Distro::LSB"];
sub isEnabled {
return !canRun('lsb_release');
if(-f '/etc/oracle-release') {
return
} else {
return !canRun('lsb_release')
}
}
sub doInventory {
    (1-1/1)