[ClusterLabs] Need bash instead of /bin/sh

Jan Pokorný jpokorny at redhat.com
Wed Sep 23 16:30:05 EDT 2015

On 23/09/15 15:38 +0200, Ulrich Windl wrote:
>>>> Vladislav Bogdanov <bubble at hoster-ok.com> schrieb am 23.09.2015 um 15:24
>> 23.09.2015 15:42, dan wrote:
>>> Did a small test:
>>> ---------------test.sh----------------
>>> controld_start() {
>>>      local addr_list=$(echo AF_INET AF_INET
>> yep, that is a bashism.
>> posix shell denies assignment of local variables in the declaration.

This is supported by checkbashisms's finding (v2.15.5):

$ checkbashisms -p test.sh 
> script test.sh does not appear to have a #! interpreter line;
> you may get strange results
> possible bashism in test.sh line 2 (local foo=bar):
>     local addr_list=$(echo AF_INET AF_INET

> In times of BASH it's hard to get POSIX shell documentation.

Oh, really?


It doesn't seem to recognize the concept of "local" declaration,

> The last we had was from HP-UX. But the problem seems to be more $()
> than assignment it seems.

That documentation recognizes $() form.

Jan (Poki)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20150923/54feab7e/attachment-0003.sig>

More information about the Users mailing list