On Mon, Dec 05, 2016 at 02:06:11PM +0100, Petter Reinholdtsen wrote:
> [Wolfgang Schweer
> > The reason is the changed output of ifconfig. As there might be (older)
> > systems with the previous ifconfig output on the network as well, both
> > types of output should be considered.
>
> Perhaps something like this might solve it, using the perl function provided by
> the sitesummary package?
>
> diff --git a/ldap-tools/sitesummary2ldapdhcp b/ldap-tools/sitesummary2ldapdhcp
> index 4c6f02b..71a62b3 100644
> --- a/ldap-tools/sitesummary2ldapdhcp
> +++ b/ldap-tools/sitesummary2ldapdhcp
> @@ -82,7 +82,7 @@ sub host_handler {
> my $hostid = shift;
> my $ipaddr = SiteSummary::get_primary_ip_address($hostid);
> my $fqdn = scalar gethostbyaddr(inet_aton($ipaddr), AF_INET);
> - my $macref = [(get_ether_hwaddr($hostid))];
> + my $macref = [(SiteSummary::get_macaddresses($hostid))];
>
Yes, works perfectly with both sorts of output from the 'ifconfig'
command.
Wolfgang
Attachment:
signature.asc
Description: Digital signature