Comment 10 for bug 1169488

Revision history for this message
Jeff Lane  (bladernr) wrote :

Hah, I didn't even realize Daniel had replied until after I posted all that.

So FWIW, my proposed fix is this:

dpkg-query -W obexftp >/dev/null 2>&1

which will give us a 0 if installed, or 1 otherwise, and no output at all. It also avoids any wonky subshell weirdness, which is what I think was happening here (dpkg maybe trying to write to stderr but getting the descriptor for the parent shell the script was running in instead of the local shell??) or some other madness.

So at the very least, eliminating the pipe and grep stuff should resolve it.