mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
systemd-networkd version of dhcpcd's 50-hostapd hook
This commit is contained in:
parent
3f94eeb0dd
commit
4eb06b469f
3 changed files with 36 additions and 0 deletions
|
@ -73,6 +73,34 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: is_raspbian
|
when: is_raspbian
|
||||||
|
|
||||||
|
- name: Create networkd-dispatcher diagnosic hook for recording network events
|
||||||
|
template:
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
with_items:
|
||||||
|
- { src: 'hostapd/00-iiab-debug', dest: '/etc/networkd-dispatcher/carrier.d/00-iiab-debug' }
|
||||||
|
- { src: 'hostapd/00-iiab-debug', dest: '/etc/networkd-dispatcher/degraded.d/00-iiab-debug' }
|
||||||
|
- { src: 'hostapd/00-iiab-debug', dest: '/etc/networkd-dispatcher/dormant.d/00-iiab-debug' }
|
||||||
|
- { src: 'hostapd/00-iiab-debug', dest: '/etc/networkd-dispatcher/no-carrier.d/00-iiab-debug' }
|
||||||
|
- { src: 'hostapd/00-iiab-debug', dest: '/etc/networkd-dispatcher/off.d/00-iiab-debug' }
|
||||||
|
- { src: 'hostapd/00-iiab-debug', dest: '/etc/networkd-dispatcher/routable.d/00-iiab-debug' }
|
||||||
|
when: systemd_networkd_active and discovered_wireless_iface != "none"
|
||||||
|
|
||||||
|
- name: Create networkd-dispatcher hook for hostapd on RPi hardware
|
||||||
|
template:
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
with_items:
|
||||||
|
- { src: 'hostapd/netd-disp', dest: '/etc/networkd-dispatcher/carrier.d/iiab-wifi' }
|
||||||
|
- { src: 'hostapd/netd-disp', dest: '/etc/networkd-dispatcher/no-carrier.d/iiab-wifi' }
|
||||||
|
when: systemd_networkd_active and discovered_wireless_iface != "none" and rpi_model != "none"
|
||||||
|
|
||||||
- name: Disable the Access Point 'hostapd' service
|
- name: Disable the Access Point 'hostapd' service
|
||||||
systemd:
|
systemd:
|
||||||
name: hostapd
|
name: hostapd
|
||||||
|
|
2
roles/network/templates/hostapd/00-iiab-debug
Normal file
2
roles/network/templates/hostapd/00-iiab-debug
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
echo "NET-DISP-$AdministrativeState $IFACE $STATE"
|
6
roles/network/templates/hostapd/netd-disp
Normal file
6
roles/network/templates/hostapd/netd-disp
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [ "$IFACE" == "{{ discovered_wireless_iface }}" ]; then
|
||||||
|
echo "NET-DISP-WiFi $IFACE $STATE"
|
||||||
|
/usr/sbin/ip link set up ap0
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue