meta-somdevices: wpa-supplicant: Added bbappend to execute wpa_supplicant@.service...
authorJosep Orga <jorga@somdevices.com>
Tue, 16 Nov 2021 16:09:38 +0000 (17:09 +0100)
committerJosep Orga <jorga@somdevices.com>
Tue, 16 Nov 2021 16:09:38 +0000 (17:09 +0100)
Added wpa-supplicant-mlan0.conf to /etc/wpa_supplicant created directory.

Signed-off-by: Josep Orga <jorga@somdevices.com>
recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant-mlan0.conf [new file with mode: 0644]
recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend [new file with mode: 0644]

diff --git a/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant-mlan0.conf b/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant-mlan0.conf
new file mode 100644 (file)
index 0000000..c93b5bd
--- /dev/null
@@ -0,0 +1,8 @@
+ctrl_interface=/var/run/wpa_supplicant
+ctrl_interface_group=0
+update_config=1
+
+network={
+        ssid="ssid0"
+        psk="pass0"
+}
diff --git a/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend b/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend
new file mode 100644 (file)
index 0000000..2a23139
--- /dev/null
@@ -0,0 +1,19 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SUMMARY = "Add wpa-supplicant-mlan0.conf file"
+DESCRIPTION = "Copy wpa-supplicant-mlan0.conf to use wpa_supplicant@.service"
+PR = "somdevices.0"
+MAINTAINER = "SomDevices <somdevices@somdevices.com>"
+
+LICENSE = "MIT"
+
+SRC_URI += " \
+       file://wpa_supplicant-mlan0.conf \
+"
+
+CONFFILES_${PN} += " ${D}${sysconfdir}/wpa_supplicant/wpa_supplicant-mlan0.conf"
+
+do_install_append () {
+    mkdir -p ${D}${sysconfdir}/wpa_supplicant
+    install -m 600 ${WORKDIR}/wpa_supplicant-mlan0.conf ${D}${sysconfdir}/wpa_supplicant/
+}