tom campbell wrote:
> Hello:
>
> I'm posting this "bug" to users group in hopes of saving someone else
> some time and to embeddedarm tech support in case they want to "fix it"
> and or pass it "upstream" (whereever that is)
>
> This one goes on my top 10 "bugs". Sometime in the hopefully distant
> future when I'm in the old programmers bar, I'll tell this one as "war
> story".
>
> It's also a good example of why software is always late.
It's a very good example! :-)
> I was switching the network of a TS-7260 from the 192.x.x.x to my
> 10.x.x.x address. I had the root filesystem of TS-7260 mounted on my
> host and was trying to boot from it on TS-7260 via NFS.
>
> I was editing etc/sysconfig/ifcfg-eth0 "host side", changing 192.x.x.x
> => 10.x.x.x. I expected it to be a cookie cutter operation. Well, it
> failed. The TS-7260 started the boot, lots of network activity, and
> just hung.
>
> Three days later after painfully decoding NFS-packets on an ethernet
> sniffer and watching what files the TS-7260 opened, I found the problem:
>
> I was editing the files with emacs which routinely leaves a backup of:
> ifcfg-eth0~
>
> The bug was in /etc/init.d/network:
> for i in /etc/sysconfig/ifcfg-*
>
> It was parsing both ifcfg-eth0 AND ifcfg-eth0~
> First setting eth0 to 10.x.x.x, and then setting it to 192.x.x.x
>
> I deleted /etc/sysconfig/ifcfg-eth0~ and it worked.
> Sigh
>
> The fix is filter the /etc/sysconfig/ifcfg-*
> I'd have fixed it and posted it, but I'm abandoning ts-linux.
Since you didn't post a fix I can't pick it apart... ;-) But it
definitely is worth mentioning that different text editors could easily
have different methods of naming backup files. If you filter out "*~"
then this problem will still bite you if your editor creates a ".bak"
file, and if you filter out ".*" then who knows, somebody might come up
with a network device called "eth1.x" or something...
A similar bug I ran into some time back involved editing a script in
emacs on my PC over NFS. I would edit the script, then try to run it on
the board, only to get really weird shell errors. It would say there
was an error in a certain line, and I would look but it would be
perfectly fine. Other times the errors would be total non-sensical
garbage. Turns out the problem was that Windows was saving the file with
CR+LF encoding, which the shell did NOT like! A quick "dos2unix" after
I saved (every time I saved, ug!) and the problem went away.
A year later I ran into the same bug and I thought "I seem to remember
this problem..." Now whenever I run into something really elementary
and widely applicable like this I make a permanent note of the solution
on my chalk board for future reference. :-)
> it's always something.
>
> tc
______ Best Regards,
|__ __/ Michael Schmidt
|| Software Engineer
||echnologic Systems (EmbeddedARM.com)
|| (480) 16525 East Laser Drive
|/ 837-5200 Fountain Hills, AZ 85268
http://oz.embeddedarm.com/~michael
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|