Commit efc95499 authored by Gauthier Provost's avatar Gauthier Provost
Browse files

Fix /etc/network/interfaces generation for IP static

parent a1e99212
...@@ -96,7 +96,7 @@ function create_if_config() { ...@@ -96,7 +96,7 @@ function create_if_config() {
echo -e "source /etc/network/interfaces.d/*\n" echo -e "source /etc/network/interfaces.d/*\n"
if [[ "$3" == "fixed" ]]; then if [[ "$3" == "fixed" ]]; then
echo -e "# Local loopback\nauto lo\niface lo init loopback\n" echo -e "# Local loopback\nauto lo\niface lo init loopback\n"
echo -e "# Interface $2\nallow-hotplug $2\nno-auto-down $2" echo -e "# Interface $2\nauto $2\nallow-hotplug $2"
echo -e "iface $2 inet static\n\taddress $address\n\tnetmask $netmask\n\tgateway $gateway\n\tdns-nameservers 8.8.8.8" echo -e "iface $2 inet static\n\taddress $address\n\tnetmask $netmask\n\tgateway $gateway\n\tdns-nameservers 8.8.8.8"
fi fi
} # } #
...@@ -261,7 +261,7 @@ function ip_editor () ...@@ -261,7 +261,7 @@ function ip_editor ()
if [[ $? = 0 ]]; then if [[ $? = 0 ]]; then
echo -e "# armbian-config created\nsource /etc/network/interfaces.d/*\n" >$3 echo -e "# armbian-config created\nsource /etc/network/interfaces.d/*\n" >$3
echo -e "# Local loopback\nauto lo\niface lo inet loopback\n" >> $3 echo -e "# Local loopback\nauto lo\niface lo inet loopback\n" >> $3
echo -e "# Interface $2\nallow-hotplug $2\nno-auto-down $2\niface $2 inet static\ echo -e "# Interface $2\nauto $2\nallow-hotplug $2\niface $2 inet static\
\n\taddress $address\n\tnetmask $netmask\n\tgateway $gateway\n\tdns-nameservers 8.8.8.8" >> $3 \n\taddress $address\n\tnetmask $netmask\n\tgateway $gateway\n\tdns-nameservers 8.8.8.8" >> $3
fi fi
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment