[issue2219] netcardconfig fails to understand new ifconfig output

Jakob Haufe bts at bts.grml.org
Sun Aug 14 17:18:49 CEST 2016


New submission from Jakob Haufe <sur5r at sur5r.net>:

ifconfig as of Debian stretch uses a different output format. This breaks
enumeration of devices in netcardconfig line 576.

Continuing to use ifconfig, the line should be changed to:

/sbin/ifconfig -a | awk ' !/^\s/{sub(/:/,"",$1);IFACE=$1} /Ethernet/{if (IFACE
!~ /^vmnet/) print IFACE" "$2}'

Unfortunately, this no longer works with ifconfig as of jessie.

Therefore, I suggest switching to ip(8):

ip link show | awk ' !/^\s/{sub(/:/,"",$2);IFACE=$2} /link.ether/{if (IFACE !~
/^vmnet/) print IFACE" "$2}'

This works on both jessie and stretch.

----------
messages: 5887
nosy: sur5r
priority: bug
status: unread
title: netcardconfig fails to understand new ifconfig output

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue2219>
_____________________________________


More information about the Bugs-changes mailing list