diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-12-22 05:39:58 +0000 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-12-22 05:39:58 +0000 |
commit | 9d811c3d9c1f4e7ad90c9b1e2bc0d85d1c7da225 (patch) | |
tree | ee52e4a14a19b15e0eeca11fa6a30d2788b6b482 /etc/NetworkManager | |
parent | 5480be3cd5e9fd4c504351ea125f5128799d6c10 (diff) |
nginx enable ipv6. Switch from systemd-networkd to networkmanager because somehow I could not ping studio global pubic ipv6 (stateless address auto-configuration? (SLAAC)?), but I can ping link-local address which makes the issue very weird
Diffstat (limited to 'etc/NetworkManager')
-rwxr-xr-x | etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive b/etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive new file mode 100755 index 00000000..79ac666e --- /dev/null +++ b/etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive @@ -0,0 +1,16 @@ +#!/bin/sh + +# https://wiki.archlinux.org/title/NetworkManager#Use_dispatcher_to_automatically_toggle_wireless_depending_on_LAN_cable_being_plugged_in + +if [ "$1" = "enp2s0" ]; then + case "$2" in + up) + nmcli radio wifi off + ;; + down) + nmcli radio wifi on + ;; + esac +elif [ "$(nmcli -g GENERAL.STATE device show enp2s0)" = "20 (unavailable)" ]; then + nmcli radio wifi on +fi |