From e8c334136969178f55b9728e0312711c7491b442 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 17 Feb 2019 16:18:45 +0200 Subject: [PATCH 1/2] S12udev: ignore errors on stop --- board/common/overlay/etc/init.d/S12udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/common/overlay/etc/init.d/S12udev b/board/common/overlay/etc/init.d/S12udev index fecf68e5cc..1c69355fd5 100755 --- a/board/common/overlay/etc/init.d/S12udev +++ b/board/common/overlay/etc/init.d/S12udev @@ -30,7 +30,7 @@ stop() { msg_begin "Stopping eudev" ${PROG_UA} control --stop-exec-queue killall -q $(basename ${PROG}) - test $? == 0 && msg_done || msg_fail + msg_done } case "$1" in From 2192bdf4188ef76e1447313e214cee7c51060eca Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 17 Feb 2019 16:27:14 +0200 Subject: [PATCH 2/2] S35wifi: enable wpa_supplicant verbose logging when OS_DEBUG is set --- board/common/overlay/etc/init.d/S35wifi | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/board/common/overlay/etc/init.d/S35wifi b/board/common/overlay/etc/init.d/S35wifi index d1b6a3901c..a215c977fe 100755 --- a/board/common/overlay/etc/init.d/S35wifi +++ b/board/common/overlay/etc/init.d/S35wifi @@ -71,7 +71,14 @@ start() { iwconfig ${OS_WLAN} power off &> /dev/null iw ${OS_WLAN} set power_save off &> /dev/null - ${PROG} -i${OS_WLAN} -c${CONF} -D${DRIVER} -B &> ${LOG} + + opts="-i${OS_WLAN} -c${CONF} -D${DRIVER} -B" + if [[ ${OS_DEBUG} == "true" ]]; then + opts+=" -dd" + fi + + ${PROG} ${opts} &>> ${LOG} + count=0 while true; do sleep 1 @@ -80,7 +87,7 @@ start() { break fi - if [[ ${count} -gt ${LINK_WATCH_TIMEOUT} ]] || ! pidof wpa_supplicant > /dev/null; then + if [[ ${count} -gt ${LINK_WATCH_TIMEOUT} ]] || ! pidof $(basename ${PROG}) > /dev/null; then test -n "${module}" && msg_fail "failed (${module})"|| msg_fail return 1 fi @@ -97,7 +104,7 @@ start() { stop() { msg_begin "Stopping wpa_supplicant" - killall wpa_supplicant &>/dev/null + killall -q $(basename ${PROG}) ps | grep wifi | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill msg_done }