Re: [iPAQ] Getting stowd to survive sleep mode

From: Sam Watkins <sam.a.t.myinternet.com.au>
Date: Wed Sep 19 2001 - 13:59:30 EDT

On Mon, Sep 17, 2001 at 10:44:39AM -0400, Guido van Rossum wrote:
> - When I use the power button to go to sleep mode and back, the
> keyboard no longer works.

I didn't solve this either - but it's only temporary until restarting stowd for
me.

> - I haven't been able to put something in the startup scripts to start
> the stowd daemon. Instead, I start and kill it with a blackbox menu
> entry, which is kind of annoying.

I use single-letter shell scripts, which I don't find annoying.

> Should I:
> - Throw my iPAQ out of the window?

No, send it to me if you don't want it!!

This is how I have solved the getty/login/ppp/stowd serial contention problem -
but be warned, it ain't pretty!

Initially I had edited /etc/inittab to run getty once only, by changing
"respawn" to "once" in the line with a "getty" it it. This enables you to kill
getty so stowd can work uninterrupted, but still lets you log into the ipaq
over serial once on boot in an emergency (if you killed X). Then I decided to
do it differently, by only suspending getty while stowd is running. This let's
init respawn getty, which is a good thing.

In /root/bin I have two files to switch from getty/ppp mode to stowd mode and
back:

file "k":
-------------------------
killall -KILL -pppd
sleep 1
killall -STOP getty login
killall getty login stowd
cd /
stowd &

file "g":
-------------------------
killall stowd getty login
killall -KILL -pppd
killall -CONT getty login

it uses my own "killall":
-------------------------
OPT=
case $1 in
        -*) OPT=$1; shift;;
esac
PROCS=`pidof -- "$@"`
if [ -n "$PROCS" ]
then
        kill $OPT $PROCS
fi

This is by no means a great solution, but it's the best I can do and I find it
very workable. I hope this might be some help.

Thanks for python, by the way :)

Sam
Received on Wed Sep 19 10:01:42 2001

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:44:11 EDT