Question about exporting wifi connection
I have 2 devices:
device nr | hostname |
---|---|
1 | my-hostname1 |
2 | my-hostname2 |
On the device1 with hostname "my-hostname1", I created a WiFi AccessPoint connection, which results to following system connection file:
[connection]
id=Hotspot
uuid=428cf697-e232-4815-a734-9797cf2e1c77
type=wifi
autoconnect=false
interface-name=wlan0
permissions=
[wifi]
mac-address-blacklist=
mode=ap
ssid=my-hostname1
[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=my-password
[ipv4]
dns-search=
method=shared
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=ignore
[proxy]
As you can see, the SSID of this connection is identical with the hostname of device1. Now, I want to copy this file to another device2 and I want to have the SSID to match the hostname of the second device, so it must be "my-hostname2".
Because I cannot create new connection using nmcli command on the device2, and I want to avoid "sed"-ing the connection file, I must copy-paste the system connection file from device1 to device2.
Is there any possibility to force the SSID to be always the hostname? I tried following configurations:
ssid=*
ssid=`hostname`
ssid=$hostname
ssid=$(hostname)
But the network manager seems to have no place holder for this parameter. Can you help me please to solve this problem? Or is there a better way to export / transfere NM configuration? Thank you!