diff options
author | John Klug <john.klug@multitech.com> | 2016-12-01 11:41:30 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2016-12-01 11:41:30 -0600 |
commit | 1c32f8662c4f02de9379418d35c3089750bd770a (patch) | |
tree | 24becac7322716b29742edc08eeadf800a8eff7d /recipes-connectivity/hostapd/hostap-daemon-2.4 | |
parent | 5194efc0b80e560933daf0171e56c2b379586a08 (diff) | |
download | meta-mlinux-1c32f8662c4f02de9379418d35c3089750bd770a.tar.gz meta-mlinux-1c32f8662c4f02de9379418d35c3089750bd770a.tar.bz2 meta-mlinux-1c32f8662c4f02de9379418d35c3089750bd770a.zip |
Do not start hostapd unless configured
Diffstat (limited to 'recipes-connectivity/hostapd/hostap-daemon-2.4')
-rw-r--r-- | recipes-connectivity/hostapd/hostap-daemon-2.4/default | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | recipes-connectivity/hostapd/hostap-daemon-2.4/init | 6 | ||||
-rw-r--r-- | recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch | 35 |
3 files changed, 8 insertions, 35 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." |