mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-04-12 17:42:21 +02:00
MycroftOS: Fix wifi startup with broadcom driver.
wpa_supplicant doesn't play nice if runned twice. One with the physical device, secondly with the virtual device. Therefor we only start wpa_supplicant of ap0 only when there is no wlan wpa config file present.
This commit is contained in:
parent
f62228173c
commit
88aa2a2653
@ -15,13 +15,17 @@ define WIFI_AP_INSTALL_TARGET_CMDS
|
|||||||
$(INSTALL) -m 644 -D $(@D)/wpa_supplicant-ap0.conf \
|
$(INSTALL) -m 644 -D $(@D)/wpa_supplicant-ap0.conf \
|
||||||
$(TARGET_DIR)/etc/wpa_supplicant/wpa_supplicant-ap0.conf
|
$(TARGET_DIR)/etc/wpa_supplicant/wpa_supplicant-ap0.conf
|
||||||
|
|
||||||
|
$(INSTALL) -D -m 644 $(@D)/wpa_supplicant-ap0.service \
|
||||||
|
$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-ap0.service
|
||||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-ap0.device.wants
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-ap0.device.wants
|
||||||
ln -fs ../../../../usr/lib/systemd/system/wpa_supplicant@.service \
|
ln -fs ../../../../usr/lib/systemd/system/wpa_supplicant-ap0.service \
|
||||||
$(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-ap0.device.wants/wpa_supplicant@ap0.service
|
$(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-ap0.device.wants/wpa_supplicant-ap0.service
|
||||||
|
|
||||||
$(INSTALL) -D -m 644 $(@D)/wifi-setup.service \
|
$(INSTALL) -D -m 644 $(@D)/wifi-setup.service \
|
||||||
$(TARGET_DIR)/usr/lib/systemd/system/wifi-setup.service
|
$(TARGET_DIR)/usr/lib/systemd/system/wifi-setup.service
|
||||||
ln -fs ../../../../usr/lib/systemd/system/wifi-setup.service \
|
ln -fs ../../../../usr/lib/systemd/system/wifi-setup.service \
|
||||||
$(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-ap0.device.wants/wifi-setup.service
|
$(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-ap0.device.wants/wifi-setup.service
|
||||||
|
|
||||||
$(INSTALL) -D -m 644 $(@D)/dnsmasq.service \
|
$(INSTALL) -D -m 644 $(@D)/dnsmasq.service \
|
||||||
$(TARGET_DIR)/usr/lib/systemd/system/dnsmasq.service
|
$(TARGET_DIR)/usr/lib/systemd/system/dnsmasq.service
|
||||||
ln -fs ../../../../usr/lib/systemd/system/dnsmasq.service \
|
ln -fs ../../../../usr/lib/systemd/system/dnsmasq.service \
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=WPA supplicant daemon (interface-specific version)
|
||||||
|
Requires=sys-subsystem-net-devices-ap0.device
|
||||||
|
After=sys-subsystem-net-devices-ap0.device
|
||||||
|
Before=network.target
|
||||||
|
Wants=network.target
|
||||||
|
|
||||||
|
# check existence of configuration file
|
||||||
|
ConditionPathExists=!/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||||
|
|
||||||
|
# NetworkManager users will probably want the dbus version instead.
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-ap0.conf -
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sys-subsystem-net-devices-ap0.device
|
Loading…
x
Reference in New Issue
Block a user