How do I control the order in which NetworkManager brings up connections?
I have a server running Fedora 28. I've created six connections using nmcli. I would like for these connections to be brought up in a certain order each time the system boots. How do I do this?
When I checked the NetworkManager reference manual, I noticed the connection.autoconnect-priority setting, which reads,
"The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority."
This does not sound like the functionality I'm after. I do not want to activate one connection without activating the remaining five. I want all six connections to activate in a certain order.
I considered the idea of adding the nmcli con up
command to my crontab and calling it at bootup, but I'm wondering if a more "elegant" solution exists.
This will bring them up one by one.
Set the ONBOOT
parameter to no
first.
#!/bin/bash
while true
do
ip link set eth0 up && break
sleep 3
done
echo "eth0 up.."
while true
do
ip link set eth1 up && break
sleep 3
done
echo "eth1 up.."