Skip to content

Commit

Permalink
set FQDN and DNS_DOMAIN key
Browse files Browse the repository at this point in the history
closes: #1358

Reported-by: Sébastien Prud'homme <sebastien.prudhomme@gmail.com>
  • Loading branch information
Gonéri Le Bouder committed Jul 1, 2012
1 parent c2a009d commit 29de824
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -3,6 +3,7 @@ Revision history for FusionInventory agent
2.3.0
General:
* various UTF8 encoding fixes
* Add DNS_DOMAIN and FQDN in OPERATINGSYSTEM section

BSD:
* Megaraid and 3ware RAID controller support (Egor Morozov)
Expand Down
5 changes: 4 additions & 1 deletion lib/FusionInventory/Agent/Task/Inventory/Input/Generic.pm
Expand Up @@ -4,6 +4,7 @@ use strict;
use warnings;

use English qw(-no_match_vars);
use Net::Domain qw(hostfqdn hostdomain);

sub isEnabled {
return 1;
Expand All @@ -15,7 +16,9 @@ sub doInventory {
my $inventory = $params{inventory};

$inventory->setOperatingSystem({
KERNEL_NAME => $OSNAME
KERNEL_NAME => $OSNAME,
FQDN => hostfqdn(),
DNS_DOMAIN => hostdomain()
});
}

Expand Down
2 changes: 1 addition & 1 deletion lib/FusionInventory/Agent/Task/Inventory/Inventory.pm
Expand Up @@ -63,7 +63,7 @@ my %fields = (
DEFAULTGATEWAY VMSYSTEM WINOWNER WINPRODID
WINPRODKEY WINCOMPANY WINLANG CHASSIS_TYPE/ ],
OPERATINGSYSTEM => [ qw/KERNEL_NAME KERNEL_VERSION NAME VERSION FULL_NAME
SERVICE_PACK INSTALL_DATE/ ],
SERVICE_PACK INSTALL_DATE FQDN DNS_DOMAIN/ ],
ACCESSLOG => [ qw/USERID LOGDATE/ ],
VIRTUALMACHINES => [ qw/MEMORY NAME UUID STATUS SUBSYSTEM VMTYPE VCPU
VMID MAC COMMENT OWNER/ ],
Expand Down

0 comments on commit 29de824

Please sign in to comment.