[Pkg-bluetooth-maintainers] Bug#534511: Bug#534511: bluez: error with dash in initscript: "bluetoothd rfcomm[: 197: unexpected operator"

Filippo Giunchedi filippo at debian.org
Fri Jun 26 16:04:02 UTC 2009


On Thu, Jun 25, 2009 at 10:18:03PM +0300, Teodor wrote:
> Package: bluez
> Version: 4.42-1
> Severity: normal
> 
> The latest version shows these warnings on start/restart:\
> | Starting bluetooth: bluetoothd rfcomm[: 197: unexpected operator
> | [: 197: unexpected operator
> | [: 197: unexpected operator
> | .
> 
> At a fist look it seems that this construction is incorrect:
> | start_rfcomm()
> | {
> |        if [ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] ; then
> 
> That is "[ X ] && [ Y ]" should probably be replaced with "[ X -a Y ]".

this doesn't give any errors at least on dash:

$ if [ -x /usr/bin/rfcomm ] && [ -f /etc/bluetooth/rfcomm ] ; then echo "foo"; fi
$ 

have you tried to change that line and the error goes away?

> I know that the original bug report was for another problem, but I thought to
> send this report here because is related to the init script. Also, this should
> confidered too:
> | # checkbashisms /etc/init.d/bluetooth
> | possible bashism in /etc/init.d/bluetooth line 159 (should be 'b = a'):
> | 	if [ "$HIDD_ENABLED" == "1" ] ||
> | possible bashism in /etc/init.d/bluetooth line 160 (should be 'b = a'):
> | 			[ "$PAND_ENABLED" == "1" ] ||
> | possible bashism in /etc/init.d/bluetooth line 161 (should be 'b = a'):
> | 			[ "$DUND_ENABLED" == "1" ]; then

this is already fixed in svn and will go in next upload, thanks

filippo
--
Filippo Giunchedi - http://esaurito.net - 0x6B79D401

Frustra fit per plura, quod fieri potest per pauciora.
It is vain to do with more what can be done with less.
-- W. of Ockham





More information about the Pkg-bluetooth-maintainers mailing list