Gabriele Bulfon <gbul...@sonicle.com> writes:

> Hi Ken,
> I have been talking with the illumos guys about the shell problem.
> They all agreed that ksh (and specially the ksh93 used in illumos) is 
> absolutely Bourne-compatible, and that the "local" variables used in the ocf 
> shells is not a Bourne syntax, but probably a bash specific.
> This means that pointing the scripts to "#!/bin/sh" is portable as long as 
> the scripts are really Bourne-shell only syntax, as any Unix variant may link 
> whatever Bourne-shell they like.
> In this case, it should point to "#!/bin/bash" or whatever shell the script 
> was written for.
> Also, in this case, the starting point is not the ocf-* script, but the 
> original RA (IPaddr, but almost all of them).
> What about making the code base of RA and ocf-* portable?
> It may be just by changing them to point to bash, or with some kind of 
> configure modifier to be able to specify the shell to use.
> Meanwhile, changing the scripts by hands into #!/bin/bash worked like a 
> charm, and I will start patching.
> Gabriele

Hi Gabriele,

Yes, your observation is correct: The resource scripts are not fully
POSIX compatible in this respect. We have been fixing these issues as
they come up, but since we all use bash-like shells it has never become
a pressing issue (IIRC Debian did have some of the same issues since
/bin/sh there is dash, which is also not fully bash-compatible).

It would be fantastic if you could file issues or submit patches at
https://github.com/ClusterLabs/resource-agents for the resource agents
where you still find these problems.

Cheers,
Kristoffer

-- 
// Kristoffer Grönlund
// kgronl...@suse.com

_______________________________________________
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to