Skip to content

Commit

Permalink
do not overwrite hostname returned by getHostname
Browse files Browse the repository at this point in the history
Tools::Win32::getHostname() returns a valid unicode hostname
unlike WMI.
  • Loading branch information
Gonéri Le Bouder committed May 24, 2012
1 parent 3c14a2b commit 582af22
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/FusionInventory/Agent/Task/Inventory/Input/Win32/OS.pm
Expand Up @@ -98,9 +98,16 @@ sub doInventory {
$inventory->setHardware({
MEMORY => $object->{TotalPhysicalMemory},
WORKGROUP => $object->{Domain} || $object->{Workgroup},
WINOWNER => $object->{PrimaryOwnerName},
NAME => $object->{Name},
WINOWNER => $object->{PrimaryOwnerName}
});

if (!$name) {
$inventory->setHardware({
NAME => $object->{Name},
});
}


}

foreach my $object (getWmiObjects(
Expand Down

0 comments on commit 582af22

Please sign in to comment.