Hello Martin,
I figured out how mLinux may be thwarting your editing via script. There is a script “/etc/init.d/config” that creates links to all the configuration files since I believe that /etc is not writable on some systems (I am not sure why mLinux is behaving in this manner other than on mLinux upgrades the /var/config directory and partition there don’t get overwritten). Anyway, I believe that your script is actually overwriting the link and not the file the link points to, ie. instead of editing the file /etc/network/interfaces->/var/config/network/interfaces, it is reading the resolved linked file “/var/config/network/interfaces”, editing it, and then writing to /etc/network/interfaces creating a new file. This works as expected.
However, upon reboot, the /etc/init.d/config script runs and since /etc/network/interfaces is not a link it blows /etc/network/interfaces away and creates the link described in the previous paragraph.
To address this try editing the file in /var/config/network/interfaces instead. That way it should persist.
Thank You,
Jeff