You are here
Tklpatch assigning static ip
I tried adding the following to a patch but after I boot up the newly patched ISO image it's not changing the default network interfaces file.
iface="eth0"
ipadd="192.168.1.2"
subn="255.255.255.0"
gatew="192.168.1.1"
echo "#The loopback network interfaces" > /etc/network/interfaces
echo " auto lo" >> /etc/network/interfaces
echo " iface lo inet loopback" >> /etc/network/interfaces
echo " " >> /etc/network/interfaces
echo " " >> /etc/network/interfaces
echo "#The primary network interface" >> /etc/network/interfaces
echo " auto ${iface}" >> /etc/network/interfaces
echo " iface ${iface} inet static" >> /etc/network/interfaces
echo " address ${ipadd}" >> /etc/network/interfaces
echo " netmask ${subn}" >> /etc/network/interfaces
echo " gateway ${gatew}" >> /etc/network/interfaces
echo " dns-nameservers 8.8.8.8 8.8.4.4" >> /etc/network/interfaces
Any suggestions?
Thanks!