On Mon, Apr 16, 2012 at 10:19 PM, Dejan Muhamedagic <[email protected]> wrote: > Hi Andrew, > > On Fri, Apr 13, 2012 at 03:50:21PM +1000, Andrew Beekhof wrote: >> Looks like someone forgot to strip off the trailing colon from the ifname >> >> +++ find_interface_generic 192.168.122.110 >> +++ ipaddr=192.168.122.110 >> +++ read ifname linkstuff >> +++ ifconfig >> +++ : Read gave us ifname = eth0: >> +++ read inet addr junk >> +++ : Read gave us inet = inet addr = 192.168.122.103 >> +++ read line >> +++ '[' 'Xinet6 fe80::5054:ff:fec5:5f28 prefixlen 64 scopeid >> 0x20<link>' '!=' X ']' >> +++ : Nothing >> +++ read line >> +++ '[' 'Xether 52:54:00:c5:5f:28 txqueuelen 1000 (Ethernet)' '!=' X ']' >> +++ : Nothing >> +++ read line >> +++ '[' 'XRX packets 154313 bytes 30845824 (29.4 MiB)' '!=' X ']' >> +++ : Nothing >> +++ read line >> +++ '[' 'XRX errors 0 dropped 6418 overruns 0 frame 0' '!=' X ']' >> +++ : Nothing >> +++ read line >> +++ '[' 'XTX packets 135804 bytes 24450439 (23.3 MiB)' '!=' X ']' >> +++ : Nothing >> +++ read line >> +++ '[' 'XTX errors 0 dropped 0 overruns 0 carrier 0 collisions 0' '!=' X >> ']' >> +++ : Nothing >> +++ read line >> +++ '[' X '!=' X ']' >> +++ case $ifname in >> +++ : 'comparing 192.168.122.110 to 192.168.122.103 (from ifconfig)' >> +++ case $addr in >> +++ read ifname linkstuff >> +++ : Read gave us ifname = eth0:0: >> +++ read inet addr junk >> +++ : Read gave us inet = inet addr = 192.168.122.110 >> +++ read line >> +++ '[' 'Xether 52:54:00:c5:5f:28 txqueuelen 1000 (Ethernet)' '!=' X ']' >> +++ : Nothing >> +++ read line >> +++ '[' X '!=' X ']' >> +++ case $ifname in >> +++ : 'comparing 192.168.122.110 to 192.168.122.110 (from ifconfig)' >> +++ case $addr in >> +++ echo eth0:0: >> +++ return 0 >> +++ return 1 >> ++ NIC=eth0:0: >> ++ echo eth0:0: >> ++ return 0 >> + NIC=eth0:0: > > Interesting, don't see the hanging ':' anywhere here, which > ifconfig version is that?
It might be new in net-tools-1.60-134.20120127git.fc17.x86_64 I thought I recalled something about findif being replaced and just assumed it came from that. > Fixed now anyway. Thanks. I took the opportunity to start using IPaddr2 but I'm sure others will benefit from the fix :) > > Thanks, > > Dejan > >> [root@pcmk-3 ~]# ip addr >> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN >> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 >> inet 127.0.0.1/8 scope host lo >> inet6 ::1/128 scope host >> valid_lft forever preferred_lft forever >> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast >> state UP qlen 1000 >> link/ether 52:54:00:c5:5f:28 brd ff:ff:ff:ff:ff:ff >> inet 192.168.122.103/24 brd 192.168.122.255 scope global eth0 >> inet 192.168.122.110/32 brd 192.168.122.110 scope global eth0:0 >> inet6 fe80::5054:ff:fec5:5f28/64 scope link >> valid_lft forever preferred_lft forever >> [root@pcmk-3 ~]# ifconfig >> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 >> inet 192.168.122.103 netmask 255.255.255.0 broadcast >> 192.168.122.255 >> inet6 fe80::5054:ff:fec5:5f28 prefixlen 64 scopeid 0x20<link> >> ether 52:54:00:c5:5f:28 txqueuelen 1000 (Ethernet) >> RX packets 154815 bytes 30877518 (29.4 MiB) >> RX errors 0 dropped 6651 overruns 0 frame 0 >> TX packets 136029 bytes 24479561 (23.3 MiB) >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 >> >> eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 >> inet 192.168.122.110 netmask 255.255.255.255 broadcast >> 192.168.122.110 >> ether 52:54:00:c5:5f:28 txqueuelen 1000 (Ethernet) >> >> 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 (Local Loopback) >> RX packets 436 bytes 44614 (43.5 KiB) >> RX errors 0 dropped 0 overruns 0 frame 0 >> TX packets 436 bytes 44614 (43.5 KiB) >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 >> _______________________________________________ >> Linux-HA mailing list >> [email protected] >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> See also: http://linux-ha.org/ReportingProblems > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
