From 0c3b276781bf8534f3d57216306457eddb983b6a Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 30 Nov 2016 11:25:34 -0600 Subject: Keep hostapd from starting on Conduit 0.0 --- .../hostapd/hostap-daemon-2.4/init.patch | 35 ++++++++++++++++++++++ recipes-connectivity/hostapd/hostap-daemon_2.4.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch (limited to 'recipes-connectivity/hostapd') diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch new file mode 100644 index 0000000..af5b44b --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch @@ -0,0 +1,35 @@ +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 e64704a..863f895 100644 --- a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb +++ b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb @@ -17,6 +17,7 @@ SRC_URI += " \ http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \ file://defconfig \ file://init \ + file://init.patch;patchdir=${WORKDIR} \ " S = "${WORKDIR}/hostapd-${PV}/hostapd" -- cgit v1.2.3