Created
January 29, 2018 19:26
-
-
Save ephemient/0e91cf169d419c43e0d5f633d72d870e to your computer and use it in GitHub Desktop.
systemd-networkd + wpa_supplicant integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Match] | |
Type=wlan | |
[Network] | |
DHCP=yes | |
[DHCP] | |
RouteMetric=2048 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Network] | |
DHCP=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ExecStartPre=-/bin/ln -s wpa_supplicant-nl80211.conf /etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Wants=wpa_supplicant-reload-nl80211@%i.path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=WPA supplicant daemon (interface- and nl80211 driver-specific version) configuration file watcher | |
After=wpa_supplicant-nl80211@%i.service | |
BindsTo=wpa_supplicant-nl80211@%i.service | |
[Path] | |
PathModified=/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf | |
Unit=wpa_supplicant-reload@%i.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=WPA supplicant daemon (interface- and wired driver-specific version) configuration file watcher | |
After=wpa_supplicant-wired@%i.service | |
BindsTo=wpa_supplicant-wired@%i.service | |
[Path] | |
PathModified=/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf | |
Unit=wpa_supplicant-reload@%i.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=WPA supplicant daemon (interface- and nl80211 driver-specific version) configuration file reloader | |
After=wpa_supplicant-nl80211@%i.service | |
Requires=wpa_supplicant-nl80211@%i.service | |
[Service] | |
ExecStart=/usr/bin/wpa_cli -i %I reconfigure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ExecStartPre=-/bin/ln -s wpa_supplicant-wired.conf /etc/wpa_supplicant/wpa_supplicant-wired-%I.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Wants=wpa_supplicant-reload-wired@%i.path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEM=="net", ENV{ID_NET_NAME}=="lo", GOTO="90_local_net_end" | |
SUBSYSTEM=="net", ENV{ID_NET_NAME}!="", ENV{DEVTYPE}=="wlan", ACTION=="add", \ | |
ENV{SYSTEMD_WANTS}+="wpa_supplicant-nl80211@$env{ID_NET_NAME}.service" | |
SUBSYSTEM=="net", ENV{ID_NET_NAME}!="", ENV{DEVTYPE}=="", ACTION=="add", \ | |
ENV{SYSTEMD_WANTS}+="wpa_supplicant-wired@$env{ID_NET_NAME}.service" | |
LABEL="90_local_net_end" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl_interface=DIR=/run/wpa_supplicant GROUP=network | |
country=US | |
network={ | |
ssid="open" | |
} | |
# this stanza can be generated with wpa_passphrase | |
network={ | |
ssid="private" | |
#psk="password" | |
psk=6db074d6bcac8381ef139fc180dfe1a6646a28c80240efaf3198056c21280624 | |
} | |
# see documentation for more details | |
network={ | |
ssid="enterprise" | |
proto=RSN | |
key_mgmt=WPA-EAP | |
pairwise=CCMP | |
auth_alg=OPEN | |
eap=PEAP | |
identity="username" | |
password="password" | |
domain_match="corporate.com" | |
phase2="auth=MSCHAPV2" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl_interface=DIR=/run/wpa_supplicant GROUP=network |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment