Hello all

running  eigerstein 2 beta/pppoe/new Busybox(0.49)
I encountered the problem that my psentry script during bootup 
was only partly started,
one time the psentry -stcp started the other time only psentry -udp
mostly neither :(

By starting it from the commandline with /etc/init.d/psentry start
the programm started each time without problems.

Analyzing the code did not reveal a cause for this.
to make it short (which it wasn't ;))
The decision to start psentry $opt  based on 

ps ax| grep $prg -$opt| grep "?" |grep "S" 

If the programm was found and sleeping then don't start.
So what happened if $prg -$opt did not exist in ps ax
first time grep $prg -$opt  did not find anything
by the second call it returned the command grep $prg -$opt itself.
and filtered the pid from the grep file out, deciding $prg is started.

This behaviour is also reproducible on the commandline.
I don't know if this is the same with all "grep versions"
I solved it by including  | sed '/grep/d' | in the call.
Now everyhting functions perfectly.

The reason i wrote it here is, that this can be the cause for difficult 
to find problems with shell scripts. 

Eric Wolzak

http://leaf.sourceforge.net/devel/ericw



_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to