[OpenSER-Devel] SF.net SVN: openser: [3064] trunk/scripts/openserdbctl.base

Dan Pascu dan at ag-projects.com
Thu Nov 8 19:42:27 UTC 2007


On Thursday 08 November 2007, Henning Westerholt wrote:
> Revision: 3064
>           http://openser.svn.sourceforge.net/openser/?rev=3064&view=rev
> Author:   henningw
> Date:     2007-11-08 07:55:52 -0800 (Thu, 08 Nov 2007)
>
> Log Message:
> -----------
> - fix the bug in the script that makes it impossible to override the
> 'ask' setting in the openserctlrc file

What exactly do you mean by bug here? That construct is the bash syntax to 
specify that if the variable is not defined then use the default value, 
the one that comes after :-
That construct was used exactly to avoid having to test if the variable is 
defined or not before assigning the default value.

dawn:~$ unset A # A is not defined
dawn:~$ A=${A:-ask}
dawn:~$ echo $A # so the default value is used
ask
dawn:~$ A='yes' # A is defined
dawn:~$ A=${A:-ask}
dawn:~$ echo $A # so the default value is ignored
yes

>
> Modified Paths:
> --------------
>     trunk/scripts/openserdbctl.base


-- 
Dan



More information about the Devel mailing list