Hi How should I know this line notebook roman # ifconfig eth1_rename 10.10.10.10 when it shows only half of it when I enter ifconfig -a eth1_rena Link encap:Ethernet HWaddr 00:50:04:E9:64:63 inet addr:10.2.4.5 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:20 Base address:0xc000 Reproducible: Always Steps to Reproduce: 1.switched from gentoo-sources to suspend2-sources 2.make & make modules_install 3. Expected Results: complete name of device in the output of the command: ifconfig -a
How exactly is this an udev bug?
This appears to be a deliberate decision on the part of the net-tools maintainers. For version 1.60 of sys-apps/net-tools, the truncated line is printed in lib/interface.c:ife_print_long with the statement: printf(_("%-9.9s Link encap:%s "), ptr->name, hw->title); The line is like this in the source unpacked from /usr/portage/distfiles/net-tools-1.60.tar.bz2. None of the patches in /usr/portage/distfiles/net-tools-1.60-patches-1.6.tar.bz2 appear to change this line.
Wouldn't it be better anyway to remove arp, ifconfig, ipmaddr, iptunnel, route, nameif and mii-tool from the base-system and to use iproute2 instead?
heh ... while the idea makes sense (iproute2 being a superior tool to the net-tools package), it just wont fly `ifconfig` is a "standard" and that'll probably never change as for whether we think the requested change here (dont truncate interfaces) is worthwhile, i dont think it is ...
there are linux distributions that already got rid of ifconfig & co (fedora IIRC)
FC6 def still includes ifconfig in the default install, but regardless, ifconfig isnt going anywhere at this time
it's a feature to make the output look nice
Guys, Can we consider reopening this bug? It was discussed on the puppet mailing list today via a gentoo user and makes gentoo look bad -- apparently gentoo is one of the few distributions that hasn't fixed it. Fedora/RHEL/Debian have apparently applied a patch to handle it properly. fyi: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=405521 Email thread in question has subject "[Puppet Users] facter fails to detect network interfaces with long names" Thanks.
we've already included the fix long ago (since i migrated us to the upstream cvs tree). it was reverted because some stupid scripts broke when the output of ifconfig changed its output format. fix openswan if you want this to go anywhere.
Actually, I'm wondering if we should consider bug #179920 (interface names truncated) as a completely different issue than bug #217775 (overall changes to which fields are displayed by default in output by ifconfig). Bug #179920 is a quick fix and that is to just the limitations of number of characters in the name of an interface that ifconfig prints. Fedora/RHEL/Debian have all done this. I'm not sure if this would break any apps. I assume openswan and other apps work fine on debian, fedora, rhel. Bug #217775 seems to something that the other distributions haven't addressed, and perhaps openswan also with the consensus being that since we can't depend on ifconfig's format being consistant, all apps should not depend on any output from ifconfig being readable. Fixing bug #179920 now might fix several apps, like app-admin/puppet, which have reported problems. Impact on bug #217775, not sure there is any? Fixing bug #217775 seems to be more of a long term strategy question....and probably can only be resolved by the upstreams for apps depending on iproute2 long term. Although, I assume there is nothing to protect us against iproute2 doing its own format changes too.
Debians patch..will confirm if rhel/fedora also applied this... --- interface.c.old 2007-01-07 22:27:17.000000000 +0100 +++ interface.c 2007-01-07 22:27:29.000000000 +0100 @@ -594,7 +594,7 @@ void ife_print_short(struct interface *ptr) { - printf("%-5.5s ", ptr->name); + printf("%-9s ", ptr->name); printf("%5d %-2d ", ptr->mtu, ptr->metric); /* If needed, display the interface statistics. */ if (ptr->statistics_valid) { @@ -685,7 +685,7 @@ if (hw == NULL) hw = get_hwntype(-1); - printf(_("%-9.9s Link encap:%s "), ptr->name, hw->title); + printf(_("%-9s Link encap:%s "), ptr->name, hw->title); /* For some hardware types (eg Ash, ATM) we don't print the hardware address if it's null. */ if (hw->print != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
fedora patch -- not sure when and to what it was applied, but listed on redhat bugzilla: https://bugzilla.redhat.com/attachment.cgi?id=147095&action=diff
not truncating changes the output format and thus possibly breaks scripts. i'm not going to consider it separate issues.