This might sound a little strange, but I try to achieve to set up an ip address permanently in Ubuntu using the command line, but not an editor.
My idea is to provision servers and just type in the ip address once and the script takes care of this.
I just can't imagine there is nothing out there that writes
ifconfig eth1 10.1.1.1 netmask 255.255.255.0 up
into the /etc/network/interfaces
file.
interfaces
file controls IP address assignations, but you want a command that both sets the address and updates that file in a single operation?man echo
would be a good place to start for figuring out how to insert text from a script into a file.chkconfig foo on
doesn't also doservice foo start
;iptables -A foo -j bar
doesn't also update/etc/sysconfig/iptables
, and so on).