summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-08-18 13:29:48 -0500
committerJohn Klug <john.klug@multitech.com>2020-11-12 09:25:56 -0600
commit63827e7985202e2f657f4e95a3f591dd62ecdea1 (patch)
treea71a0e57386a6dfeee4a3e7a67301470fd5eb29d
parenta15c425dda7807f17b5526160f6fb164c05da0e1 (diff)
downloadmeta-mlinux-63827e7985202e2f657f4e95a3f591dd62ecdea1.tar.gz
meta-mlinux-63827e7985202e2f657f4e95a3f591dd62ecdea1.tar.bz2
meta-mlinux-63827e7985202e2f657f4e95a3f591dd62ecdea1.zip
Add etc/default/hostapd to packaging
-rw-r--r--recipes-connectivity/hostapd/hostapd/default6
-rw-r--r--recipes-connectivity/hostapd/hostapd_%.bbappend19
2 files changed, 18 insertions, 7 deletions
diff --git a/recipes-connectivity/hostapd/hostapd/default b/recipes-connectivity/hostapd/hostapd/default
index a274de1..8f3287d 100644
--- a/recipes-connectivity/hostapd/hostapd/default
+++ b/recipes-connectivity/hostapd/hostapd/default
@@ -2,5 +2,7 @@
START_ON_BOOT="no"
# Stuff to creat the device if needed.
DEV=wifi1
-PREUP="[[ -d /sys/class/net/${DEV} ]] || (ifdown wifi1;/opt/rs9113/onebox_util rpine0 create_vap ${DEV} ap;rfkill unblock all)"
-POSTUP="ifup wifi1"
+if [[ -x /opt/rs9113/onebox_util ]] ; then
+ PREUP="[[ -d /sys/class/net/${DEV} ]] || (ifdown ${DEV};/opt/rs9113/onebox_util rpine0 create_vap ${DEV} ap;rfkill unblock all)"
+ POSTUP="ifup ${DEV}"
+fi
diff --git a/recipes-connectivity/hostapd/hostapd_%.bbappend b/recipes-connectivity/hostapd/hostapd_%.bbappend
index 7851129..3d8ad14 100644
--- a/recipes-connectivity/hostapd/hostapd_%.bbappend
+++ b/recipes-connectivity/hostapd/hostapd_%.bbappend
@@ -1,4 +1,5 @@
SRC_URI += "file://cfg80211.conf"
+PR = "m1"
do_install_append() {
install -d ${D}{sysconfdir}/modprobe.d
@@ -10,14 +11,17 @@ do_install_append() {
SRC_URI += " file://cfg80211.conf \
file://WiFi-SSID \
file://setchan \
+ file://default \
"
do_install() {
install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
- install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}
- install -m 0755 ${S}/hostapd ${D}${sbindir}
- install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
+ install -d ${D}${sbindir} ${D}${sysconfdir}/default
+ install -m 0644 ${B}/hostapd.conf ${D}${sysconfdir}
+ install -m 0755 ${B}/hostapd ${D}${sbindir}
+ install -m 0755 ${B}/hostapd_cli ${D}${sbindir}
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
+ install -m 755 ${WORKDIR}/default ${D}${sysconfdir}/default/hostapd
install -m 644 -D ${WORKDIR}/cfg80211.conf ${D}${sysconfdir}/modprobe.d/cfg80211.conf
install -d ${D}/usr/share/hostap-daemon
@@ -26,9 +30,14 @@ do_install() {
install -m 0744 ${WORKDIR}/setchan ${D}/usr/local/bin
}
-PACKAGES =+ "${PN}-extra"
+PACKAGES =+ "${PN}-extra ${PN}-cfg"
+RDEPENDS_${PN}-extra = "${PN}-cfg bash"
+
FILES_${PN}-extra = "/usr/local/bin/* /usr/share/hostap-daemon/WiFi-SSID.patch"
+# mLinux files
+FILES_${PN}-cfg = "/etc/init.d/hostapd /etc/default/hostapd /etc/hostapd.conf"
+
pkg_postinst_${PN}-bt-name() {
cd /$D
patch -Np1 < $D/usr/share/hostap-daemon/WiFi-SSID.patch
@@ -37,4 +46,4 @@ pkg_postinst_${PN}-bt-name() {
pkg_prerm_${PN}-bt-name() {
cd /$D
patch -Rp1 < $D/usr/share/hostap-daemon/WiFi-SSID.patch
-} \ No newline at end of file
+}