Hi,

On Fri, Apr 30, 2010 at 4:32 PM, brianpocock <[email protected]
> wrote:

>
> Just checked my configuration and it works fine for me with:
> if [ $DBENGINE -eq "MYSQL" ]
> when doing opensipsctl alias_db list/show
>
> Not sure whether you made a typo with:
> if [ $DBENGINE -eq "MYSQL" ]
> if [ $DBENGINE -eq "PGSQL" ]
>
> but it should read:
> if [ $DBENGINE -eq "MYSQL" ]
> elif [ $DBENGINE -eq "PGSQL" ]
>
> I don't see any substantial difference between if and elif in this
situation. Yes, it will save you a couple of milliseconds to execute because
it won't do the second comparison, but the logyc is the same.
In this case the operator is incorrect. If you man sh, you will see that -eq
is an arithmetic binary operator, but = or == is used to compare strings.

You might have an interpreter which will understand both versions, but don't
forget there're lots of them out there.



> Hope this helps
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/opensipsctl-erros-tp4985896p4985961.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
Best regards,
Vadim Grinco
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to