From 6c6bec35ec9249d3a88242d6232fa5c9a521355b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fdez?= Date: Sat, 10 Nov 2018 13:21:48 +0100 Subject: [PATCH] wireless: make QBookApp happy across switches --- platform/cervantes/koreader-standalone.sh | 7 +++++-- platform/cervantes/koreader.sh | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/cervantes/koreader-standalone.sh b/platform/cervantes/koreader-standalone.sh index 21925085b..bca4a862a 100755 --- a/platform/cervantes/koreader-standalone.sh +++ b/platform/cervantes/koreader-standalone.sh @@ -33,8 +33,11 @@ if [ -b /dev/mmcblk1p1 ]; then mount /dev/mmcblk1p1 /mnt/sd fi -# remove wireless module since it wastes battery. -if lsmod | grep -q 8189fs; then +# stop connman daemon, KOReader will use wpa_supplicant directly. +[ -x /etc/init.d/connman ] && /etc/init.d/connman stop + +# for Cervantes 4 unload realtek module. +if [ "$PCB_ID" -eq 68 ] && lsmod | grep -q 8189fs; then modprobe -r 8189fs fi diff --git a/platform/cervantes/koreader.sh b/platform/cervantes/koreader.sh index 0ec5a8e12..6308dfe08 100755 --- a/platform/cervantes/koreader.sh +++ b/platform/cervantes/koreader.sh @@ -76,6 +76,7 @@ fi if [ "${STANDALONE}" != "true" ]; then stopapp.sh >/dev/null 2>&1 + [ -x /etc/init.d/connman ] && /etc/init.d/connman stop fi RETURN_VALUE=85 @@ -85,5 +86,6 @@ while [ "${RETURN_VALUE}" -eq 85 ]; do done if [ "${STANDALONE}" != "true" ]; then + [ -x /etc/init.d/connman ] && /etc/init.d/connman start restart.sh >/dev/null 2>&1 fi