feisty01
May 18th, 2011, 09:23 AM
hello, I'm newbie in python language and to begin I decided to create a script which take agrs : interface, ip and netmask in order to configure automaticaly networks interfaces.
To push on system I use os.system(str) where 'str' is the string below : ifconfig eth0 192.168.1.101 netmask 255.255.255.0
It works but only few minutes. After 10 minutes, the interface go back to it initial statement AUTO and I don't understand why.
I also try use popen method unfortunately with th same results.
Any ideas? thanks
To push on system I use os.system(str) where 'str' is the string below : ifconfig eth0 192.168.1.101 netmask 255.255.255.0
It works but only few minutes. After 10 minutes, the interface go back to it initial statement AUTO and I don't understand why.
I also try use popen method unfortunately with th same results.
Any ideas? thanks