View Single Post
Old 01-30-2016, 05:57 AM   #5
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
This is CoolReader's suspend script I'm using (just for everyone to be sure which one is used in my testing):

Code:
#!/bin/sh

export PATH=$PATH:/sbin:/usr/sbin

echo "suspend.sh: enter"

handler()
{
    kill -15 $pid
    echo 0 > /sys/power/state-extended
    echo "suspend.sh: killed"
    exit 1
}

trap handler SIGTERM

sleep 10 &
pid=$!
wait $pid

# disable wifi
if lsmod | grep -q sdio_wifi_pwr ; then
    wlarm_le -i eth0 down
    ifconfig eth0 down
    /sbin/rmmod -r dhd
    /sbin/rmmod -r sdio_wifi_pwr
fi

echo 1 > /sys/power/state-extended
echo "suspend.sh: delay 2s (dragon)"
sleep 2 &
pid=$!
wait $pid

echo "sleeping... zzz-zzz-zzz-zzz :)"
sync
echo mem > /sys/power/state
echo 0 > /sys/power/state-extended

echo "suspend.sh: normal exit"
This is first mentioned in this post.
Alan_S is offline   Reply With Quote