Skip to content

Commit

Permalink
Add wpa_supplicant.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi committed Oct 17, 2023
1 parent 037e3fb commit c1e1fb8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kas-jpos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 10 additions & 0 deletions recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf-sane
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 9 additions & 0 deletions recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit c1e1fb8

Please sign in to comment.