<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear All,<div><br></div><div>I'm trying to start wpa_supplicant with wlan0 as the interface on boot using systemd.</div><div><br></div><div>I've created the following .bbappend for wpa_supplicant to install the new configuration and enable the wpa_supplicant@wlan0.service. This doesn't enable the service and somehow breaks being able the start the wpa_supplicant@wlan0.service.</div><div><br></div><div>Has anybody else figured out how to get this to work?</div><div><br></div><div>$ cat wpa-supplicant_2.%.bbppend:  <br></div><div><br></div><div><div>FILESEXTRAPATHS_prepend := "${THISDIR}/files:"</div><div><br></div><div>SRC_URI_append = " file://wpa_supplicant-wlan0.conf"</div><div><br></div><div>inherit systemd</div><div><br></div><div>SYSTEMD_PACKAGES = "${PN}"</div><div>SYSTEMD_SERVICE_${PN} += " wpa_supplicant@wlan0.service"</div><div>SYSTEMD_AUTO_ENABLE = "enable"</div><div><br></div><div>do_install_append () {</div><div>  install -d ${D}${sysconfdir}/wpa_supplicant</div><div>  install -m 0644 ${WORKDIR}/wpa_supplicant-wlan0.conf ${D}/${sysconfdir}/wpa_supplicant/</div><div>}</div></div><div><br></div><div>As a workaround, I created a .bbappend to manually create the symlink for systemd which does enable the service. Although, I would like to know if there is a better way of doing this.</div><div><br></div><div>$ cat wpa-supplicant_2.%.bbppend:</div><div><br></div><div><div>FILESEXTRAPATHS_prepend := "${THISDIR}/files:"</div><div><br></div><div>SRC_URI_append = " file://wpa_supplicant-wlan0.conf"</div><div><br></div><div>do_install_append () {</div><div>  install -d ${D}${sysconfdir}/wpa_supplicant</div><div>  install -m 0644 ${WORKDIR}/wpa_supplicant-wlan0.conf ${D}/${sysconfdir}/wpa_supplicant/</div><div>  install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants</div><div>  ln -s ../../../../lib/systemd/system/wpa_supplicant@.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service</div><div>}</div></div><div><br></div></div></div></div></div>