Skip to content
Snippets Groups Projects
Commit 2e6c46da authored by Jonas Höppner's avatar Jonas Höppner
Browse files

setup_network: Fix the script

parent 503f3f99
No related branches found
No related tags found
1 merge request!188setup_network: Fix the script
...@@ -7,7 +7,7 @@ nmcli d wifi connect $SSID password $WIFIPASS ...@@ -7,7 +7,7 @@ nmcli d wifi connect $SSID password $WIFIPASS
nmcli con mod "$SSID" connection.autoconnect yes ipv4.method manual ipv4.addresses 192.168.3.1/24 ipv4.gateway 192.168.3.100 nmcli con mod "$SSID" connection.autoconnect yes ipv4.method manual ipv4.addresses 192.168.3.1/24 ipv4.gateway 192.168.3.100
nmcli -t c up "$SSID" nmcli -t c up "$SSID"
if ! ip a s dev eth0 | grep -q "does not exist";then if ! ip a s dev eth0 2>&1 | grep -q "does not exist";then
if ! nmcli con | grep -q "Wired connection eth0";then if ! nmcli con | grep -q "Wired connection eth0";then
nmcli connection add type ethernet ifname eth0 con-name "Wired connection eth0" nmcli connection add type ethernet ifname eth0 con-name "Wired connection eth0"
fi fi
...@@ -15,7 +15,7 @@ if ! ip a s dev eth0 | grep -q "does not exist";then ...@@ -15,7 +15,7 @@ if ! ip a s dev eth0 | grep -q "does not exist";then
nmcli -t c up "Wired connection eth0" nmcli -t c up "Wired connection eth0"
fi fi
if ! ip a s dev eth1 | grep -q "does not exist";then if ! ip a s dev eth1 2>&1 | grep -q "does not exist";then
if ! nmcli con | grep -q "Wired connection eth1";then if ! nmcli con | grep -q "Wired connection eth1";then
nmcli connection add type ethernet ifname eth1 con-name "Wired connection eth1" nmcli connection add type ethernet ifname eth1 con-name "Wired connection eth1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment