Your distro most probably ships with networkmanager so instead of reinventing the wheel you could actually use it.
GUI configuration varies but files are similar, mine (in /etc/NetworkManager/system-connections/) looks like this:
Code:
[802-3-ethernet]
port=mii
mac-address=ee:49:0:0:0:0
[connection]
id=usbnet kindle
uuid=30a862ca-e1a0-4f8a-ac91-e0410b53a391
type=802-3-ethernet
permissions=user:zizzfizzix:;
[ipv6]
method=ignore
[ipv4]
method=manual
addresses1=192.168.15.1;24;0.0.0.0;