[Fusioninventory-commit] [fusinv/fusioninventory-agent] 1415ed: fix: linux ifconfig parsing on Fedora 17

Gonéri Le Bouder goneri at rulezlan.org
Mon Sep 3 17:12:14 UTC 2012


  Branch: refs/heads/2.2.x+ifconfig-fc17
  Home:   https://github.com/fusinv/fusioninventory-agent
  Commit: 1415ed118bb4f5426a26e994ee4ef589eaa642ab
      https://github.com/fusinv/fusioninventory-agent/commit/1415ed118bb4f5426a26e994ee4ef589eaa642ab
  Author: Gonéri Le Bouder <goneri at rulezlan.org>
  Date:   2012-09-03 (Mon, 03 Sep 2012)

  Changed paths:
    M lib/FusionInventory/Agent/Tools/Linux.pm
    A resources/generic/ifconfig/linux-fc17
    M t/tools/linux.t

  Log Message:
  -----------
  fix: linux ifconfig parsing on Fedora 17

ifconfig output on Fedora 17 is based on a net-tools git
snapshot:
  net-tools-1.60-138.20120702git.fc17.x86_64

The ifconfig output is much more UNIX like:
-->8------
    em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.0.11 netmask 255.255.255.0 broadcast 192.168.0.255
    inet6 2a01:e35:2f18:2790:22cf:30ff:feec:c889 prefixlen 64 scopeid 0x0<global>
    inet6 fe80::22cf:30ff:feec:c889 prefixlen 64 scopeid 0x20<link>
    ether 20:cf:30:ec:c8:89 txqueuelen 1000 (Ethernet)
    RX packets 467964 bytes 438067184 (417.7 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 462167 bytes 273637311 (260.9 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 0 (Boucle locale)
    RX packets 121763 bytes 59893237 (57.1 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 121763 bytes 59893237 (57.1 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
    ether 52:54:00:38:0d:b7 txqueuelen 0 (Ethernet)
    RX packets 36309 bytes 2533768 (2.4 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 78400 bytes 112637354 (107.4 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

--8<------
Unlike UNIX ifconfig, there is an empty link like the common Linux
ifconfig.

https://bugzilla.redhat.com/show_bug.cgi?id=853982

Reported-by: Remi Collet <Remi at FamilleCollet.com>





More information about the Fusioninventory-commit mailing list