diff --git a/kas-jpos.yaml b/kas-jpos.yaml index ad0576c..9f6ffef 100644 --- a/kas-jpos.yaml +++ b/kas-jpos.yaml @@ -40,3 +40,6 @@ local_conf_header: dirs: | DL_DIR ?= "${TOPDIR}/../downloads" SSTATE_DIR ?= "${TOPDIR}/../sstate-cache" +env: + JPOS_WPA_SSID: "$JPOS_WPA_SSID" + JPOS_WPA_PSK: "$JPOS_WPA_PSK" diff --git a/recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf-sane b/recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf-sane new file mode 100644 index 0000000..eb06ad4 --- /dev/null +++ b/recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf-sane @@ -0,0 +1,10 @@ +ctrl_interface=/var/run/wpa_supplicant +ctrl_interface_group=0 +update_config=1 + +network={ + scan_ssid=1 + ssid="@JPOS_WPA_SSID@" + psk="@JPOS_WPA_PSK@" + key-mgmt=WPA-PSK +} diff --git a/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend b/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend new file mode 100644 index 0000000..62e2776 --- /dev/null +++ b/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +JPOS_WPA_SSID ?= "" +JPOS_WPA_PSK ?= "" + +do_configure:prepend() { + sed -i -e 's#[@]JPOS_WPA_SSID[@]#${JPOS_WPA_SSID}#' ${WORKDIR}/wpa_supplicant.conf-sane + sed -i -e 's#[@]JPOS_WPA_PSK[@]#${JPOS_WPA_PSK}#' ${WORKDIR}/wpa_supplicant.conf-sane +}