Greetings.
I need to be able to let users of a TS-7250 change the boards IP address. I
have added a menu entry to the system configuration system that lets a user
enter the IP addres the boards should use. When I have my code set the address
the board winds up with some other address.
The main example of the problem is as follows. The user edits a string that
defaults to "192.168.000.050". The user changes the string to end in "051".
All is well so far until attempting to set the address.
I have verified the string looks ok. However, when the software issues builds
the string "/sbin/ifconfig eth0 192.168.000.051" and passes it in a call to
system() the boards address changes to 192.168.0.41. That isn't a typo.
I have verified that it is .41 as I can telnet in to the board using that
address. If I try to telnet in with .51 the board does not respond. If I enter
the command at a shell prompt, the IP address is set correctly.
Any idea what is going on here? How can I change the IP address reliably? I
would prefer not having to rewrite the ifcfg-eth0 file and restart the network
from within my application.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
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/
|