summaryrefslogtreecommitdiff
path: root/recipes-connectivity/hostapd
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/hostapd')
-rw-r--r--recipes-connectivity/hostapd/hostap-daemon-2.4/default2
-rwxr-xr-x[-rw-r--r--]recipes-connectivity/hostapd/hostap-daemon-2.4/init6
-rw-r--r--recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch35
-rw-r--r--recipes-connectivity/hostapd/hostap-daemon_2.4.bb7
4 files changed, 14 insertions, 36 deletions
diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.4/default b/recipes-connectivity/hostapd/hostap-daemon-2.4/default
new file mode 100644
index 0000000..0923a8c
--- /dev/null
+++ b/recipes-connectivity/hostapd/hostap-daemon-2.4/default
@@ -0,0 +1,2 @@
+# set to "yes" to start hostapd on boot
+START_ON_BOOT="no"
diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.4/init b/recipes-connectivity/hostapd/hostap-daemon-2.4/init
index 79f74b6..12ea944 100644..100755
--- a/recipes-connectivity/hostapd/hostap-daemon-2.4/init
+++ b/recipes-connectivity/hostapd/hostap-daemon-2.4/init
@@ -6,10 +6,16 @@ ARGS="/etc/hostapd.conf -B"
test -f $DAEMON || exit 0
+[ -f /etc/default/$NAME ] && . /etc/default/$NAME
+
+
set -e
case "$1" in
start)
+ if [ "$START_ON_BOOT" != "yes" ]; then
+ exit 0
+ fi
echo -n "Starting $DESC: "
start-stop-daemon -S -x $DAEMON -- $ARGS
echo "$NAME."
diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch
deleted file mode 100644
index af5b44b..0000000
--- a/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -uprN old/init new/init
---- old/init 2016-11-30 10:37:35.512524572 -0600
-+++ new/init 2016-11-30 10:35:11.176524877 -0600
-@@ -3,6 +3,21 @@ DAEMON=/usr/sbin/hostapd
- NAME=hostapd
- DESC="HOSTAP Daemon"
- ARGS="/etc/hostapd.conf -B"
-+PLTFM="/sys/devices/platform/mts-io"
-+PRDIDFILE="${PLTFM}/product-id"
-+if ! [[ -f "${PRDIDFILE}" ]] ; then
-+ echo "No ${PRDIDFILE}."
-+ exit 1
-+fi
-+PRDID=$(cat "${PLTFM}/product-id")
-+CONDUIT="^MTCDT"
-+((WIFIBT=1))
-+if [[ $PRDID =~ $CONDUIT ]] ; then
-+ if ! [[ -f ${PLTFM}/wifi-bt-reset ]] ; then
-+ ((WIFIBT=0))
-+ fi
-+fi
-+
-
- test -f $DAEMON || exit 0
-
-@@ -10,6 +25,9 @@ set -e
-
- case "$1" in
- start)
-+ if ((WIFIBT == 0)) ; then
-+ exit 0
-+ fi
- echo -n "Starting $DESC: "
- start-stop-daemon -S -x $DAEMON -- $ARGS
- echo "$NAME."
diff --git a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb
index 863f895..9244da4 100644
--- a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb
+++ b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb
@@ -17,7 +17,7 @@ SRC_URI += " \
http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
file://defconfig \
file://init \
- file://init.patch;patchdir=${WORKDIR} \
+ file://default \
"
S = "${WORKDIR}/hostapd-${PV}/hostapd"
@@ -36,3 +36,8 @@ CONFFILES_${PN} += "${sysconfdir}/hostapd.conf"
SRC_URI[md5sum] = "04578f3f2c3eb1bec1adf30473813912"
SRC_URI[sha256sum] = "6fe0eb6bd1c9cbd24952ece8586b6f7bd14ab358edfda99794e79b9b9dbd657f"
+
+do_install_append() {
+ mkdir -p ${D}${sysconfdir}/default
+ install -m 644 ${WORKDIR}/default ${D}${sysconfdir}/default/hostapd
+}