Score:0

Avoid NetworkManager automatically bring up connection

ve flag

There is a similar question but it's quite old. I hope there's a better solution today.

Ubuntu 20.04. I created a new NetworkManager connection inside the system-connections directory:

[connection]
id=Hotspot
uuid=0eff5f25-c126-4059-a34f-eb4d593d548a
type=wifi
interface-name=wlp1s0
permissions=
timestamp=1636047779

[wifi]
band=bg
mac-address-blacklist=
mode=ap
ssid=device_43ca

[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=<pwd>

[ipv4]
dns-search=
method=shared

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

[proxy]

Here my NetworkManager.conf:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

On boot, I have my "Hotspot" connection UP. I want to use NetworkManager to handle this connection, but manually. For example I wrote this script:

#!/bin/bash
enable="$1";

if [ "$enable" = "on" ];
then
  nmcli con up Hotspot
else
  nmcli con down Hotspot
fi;

So, how I can tell NetworkManager to not bring UP a specific connection on boot?

I'm aware I can disable a specific device, but this is not what I want to achieve.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.