During my experiments with DBUS (see my other message) I tried to react to
DBUS signals through shell scripts; However, I encountered a strange problem:
I tried to parse the output of "dbus-monitor --system", which should be no
problem with sh, grep or awk. But there is an issue regarding the buffering of
its output pipe. What I tried to code boiles down to the following lines:
dbus-monitor --system | while read LINE; do <something with $LINE>; done
However, nothing happens. I noticed that no lines are passed through the pipe,
which can be checked by this command:
dbus-monitor --system | cat -
Instead of printing dbus events to console, nothing happens. I guess that this
might be a buffering issue with busybox or dbus-monitor, however these
commands work fine on the Debian system installed on my notebook.
What would be even cooler than this would be a dbus-signal-wait command, which
just sleeps until a specified events occurs; This way, a shell script waiting
for internet connectivity could just be implemented by writing:
while dbus-signal-wait -i com.nokia.......; do
use_connection
done
OK, any comments regarding my ideas? :-)
--
.:[EMAIL PROTECTED] | [EMAIL PROTECTED] | GPG: finger [EMAIL PROTECTED] °:.
|_____________________ http://stefans.datenbruch.de/__ ______________________|
| Wer Header fälscht oder verfälscht oder gefälschte oder verfälschte Header |
`-__in_Umlauf_bringt_wird_mit_Scorefile_nicht_unter_-500_Punkten_bestraft__-'
_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers