[Bug 1328285] Re: can not find hardware address
Steve Langasek
steve.langasek at canonical.com
Tue Jun 10 00:35:15 UTC 2014
<slangasek> stgraber: do you know a proper way to programmatically get a list of all network interfaces on a system, including those that are currently down? http://linux.die.net/man/7/netdevice documents that SIOCGIFCONF doesn't include down interfaces, and recommends /proc/net/dev instead
<stgraber> slangasek: I usually iterate through /sys/class/net which works fine if you just want a list or want physical interface related kind of information. If you need to query the interface configuration, then you need getifaddrs and it's a whole other kind of worm (also, some most IPv6 info is also in /proc, but ipv4 isn't... yay for consistency)
<slangasek> stgraber: context is whoopsie trying to get a mac address to use as a system identifier; this shouldn't be dependent on network interfaces being up
<stgraber> slangasek: /sys/class/net/*/address will get you that
<stgraber> slangasek: if you want to make sure you've got an ethernet device (and therefore a MAC), check that /type == 1 too
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to whoopsie in Ubuntu.
https://bugs.launchpad.net/bugs/1328285
Title:
can not find hardware address
Status in “whoopsie” package in Ubuntu:
Triaged
Bug description:
Working with popey, trying to figure out why his crashes weren't
reported.
Jun 9 22:24:28 ubuntu-phablet whoopsie[1934]: whoopsie 0.2.30 starting up.
Jun 9 22:24:28 ubuntu-phablet whoopsie[1934]: Unable to find a hardware address
Jun 9 22:24:28 ubuntu-phablet whoopsie[1934]: Using lock path: /var/lock/whoopsie/lock
Jun 9 22:24:29 ubuntu-phablet whoopsie[1953]: offline
Jun 9 22:24:33 ubuntu-phablet whoopsie[1953]: message repeated 3 times: [ offline]
Jun 9 22:24:33 ubuntu-phablet whoopsie[1953]: online
Jun 9 22:24:34 ubuntu-phablet whoopsie[1953]: online
Jun 9 22:25:10 ubuntu-phablet whoopsie[1953]: offline
Jun 9 22:25:13 ubuntu-phablet whoopsie[1953]: message repeated 2 times: [ offline]
Jun 9 22:25:13 ubuntu-phablet whoopsie[1953]: online
Notice the "unable to find a hardware address". Ted suggests:
14:51 < tedg> bdmurray, I imagine that is because it can't
find oFono. Perhaps the upstart jobs need to
be adjusted so it doesn't start until after
oFono is up.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1328285/+subscriptions
More information about the foundations-bugs
mailing list