https://github.com/sbakker/nm-wlan
NetworkManager scripts for WiFi
https://github.com/sbakker/nm-wlan
laptop linux networkmanager-scripts nm-wlan
Last synced: 3 months ago
JSON representation
NetworkManager scripts for WiFi
- Host: GitHub
- URL: https://github.com/sbakker/nm-wlan
- Owner: sbakker
- License: gpl-3.0
- Created: 2017-09-11T19:10:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-27T12:33:20.000Z (about 3 years ago)
- Last Synced: 2025-03-12T08:45:42.632Z (7 months ago)
- Topics: laptop, linux, networkmanager-scripts, nm-wlan
- Language: Shell
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nm-wlan - NetworkManager WLAN scripts
A few scripts to handle Wifi connections on a laptop.
# Scripts
## /etc/NetworkManager/dispatcher.d/99-wlan
Usage: **99-wlan** *IFACE* *ACTION*
* Disable WiFi when a wired connection comes up.
* Re-enable WiFi when the wired connection goes down again.
* When a WiFi connection `CONN_NAME` comes up, run `wlan-up.d/CONN_NAME` if it exists.Triggered by *any* wired interface, so really only useful for laptops with one interface.
## /etc/NetworkManager/dispatcher.d/wlan-up.d/default
Default script to run if a WiFi connection comes up and there is no explicit script for the network.
## /etc/NetworkManager/dispatcher.d/wlan-up.d/scripts/disable_ipv6.sh
Usage: **disable_ipv6** [*IFACE* [*ACTION* [*CONN_NAME*] ] ]
Helper script to disable IPv6 on the given interface.
# Installation
Install the `dispatcher.d` files in `/etc/NetworkManager/dispatcher.d`, owned by `root`.
```
rsync -av dispatcher.d/ /etc/NetworkManager/dispatcher.d/
chown -R root: /etc/NetworkManager/dispatcher.d
```# Usage
The `99-wlan` should get called automatically.
To execute custom actions for when a WiFi network `FOO` comes up, create a script in `/etc/NetworkManager/wlan-up.d/FOO`. For example, if you want to disable IPv6 on network `FOO`:
```
sudo dd of=/etc/NetworkManager/wlan-up.d/FOO <'EOF'
#!/bin/shdisable_ipv6.sh "$@"
EOF
sudo chmod +x /etc/NetworkManager/wlan-up.d/FOO
sudo chown root: /etc/NetworkManager/wlan-up.d/FOO
```