fix(vpn): use 'id' keyword instead of '--' in nmcli connection up/down

Newer nmcli no longer parses '--' as end-of-options for 'connection up',
it treats it as the connection name and fails with "Unbekannte
Verbindung »--«". The 'id' keyword is the canonical way to mark the
following argument as the connection name.
This commit is contained in:
nevaforget committed 2026-04-24 20:41:08 +02:00
1 parent 30f952190d
commit dd5180d03b
1 file changed
+2 -2
+2 -2
View File
@@ -39,13 +39,13 @@ function extract_connection_name() {
# Requires nm-applet (or another NM secret agent) for interactive auth.
function connect_vpn() {
local connection="$1"
nmcli connection up -- "$connection"
nmcli connection up id "$connection"
}
# Disconnect a VPN.
function disconnect_vpn() {
local connection="$1"
nmcli connection down -- "$connection"
nmcli connection down id "$connection"
}
# Toggle the VPN connection based on its current state.