yocto_os/sources/meta-tsgrain/recipes-connectivity/hostapd/hostapd_%.bbappend

24 lines
744 B
Text

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = "\
file://hostapd.conf \
"
FILES_${PN} += "/data/hostapd/hostapd.conf"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
do_install_append() {
# Remove original config file
rm -rf ${D}${sysconfdir}
# Install config file to appfs
install -D -m 644 ${WORKDIR}/hostapd.conf ${D}/data/hostapd/hostapd.conf
sed -i -e 's,@WIFI_PASSWORD@,${WIFI_PASSWORD},g' ${D}/data/hostapd/hostapd.conf
# Change config file path
install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system/
sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,/data/hostapd,g' ${D}${systemd_unitdir}/system/hostapd.service
}
CONFFILES_${PN} = "/data/hostapd/hostapd.conf"