<div style="font-family: Arial; font-size: 13;">I think the main issue is the usage of the "local" operator in ocf*</div><div style="font-family: Arial; font-size: 13;">I'm not an expert on this operator (never used!), don't know how hard it is to replace it with a standard version.</div><div style="font-family: Arial; font-size: 13;"><br></div><div style="font-family: Arial; font-size: 13;">Happy to contribute, it still the case</div><div style="font-family: Arial; font-size: 13;"><br></div><div style="font-family: Arial; font-size: 13;">Gabriele<br><br><div id="wt-mailcard"><div style="font-family: Arial;">----------------------------------------------------------------------------------------<br></div><div style="font-family: Arial;"><b>Sonicle S.r.l. </b>: <a href="http://www.sonicle.com/" target="_new">http://www.sonicle.com</a></div><div style="font-family: Arial;"><b>Music: </b><a href="http://www.gabrielebulfon.com/" target="_new">http://www.gabrielebulfon.com</a></div><div style="font-family: Arial;"><b>Quantum Mechanics : </b><a href="http://www.cdbaby.com/cd/gabrielebulfon" target="_new">http://www.cdbaby.com/cd/gabrielebulfon</a></div></div><tt><br><br><br>----------------------------------------------------------------------------------<br><br>Da: Kristoffer Grönlund <kgronlund@suse.com><br>A: gbulfon@sonicle.com Cluster Labs - All topics related to open-source clustering welcomed <users@clusterlabs.org> kgaillot@redhat.com Cluster Labs - All topics related to open-source clustering welcomed <users@clusterlabs.org> <br>Data: 29 agosto 2016 14.36.23 CEST<br>Oggetto: Re: [ClusterLabs] ocf scripts shell and local variables<br><br></tt><blockquote style="BORDER-LEFT: #000080 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px"><tt>Gabriele Bulfon <gbulfon@sonicle.com> writes:<br><br>> Hi Ken,<br>> I have been talking with the illumos guys about the shell problem.<br>> 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.<br>> 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.<br>> In this case, it should point to "#!/bin/bash" or whatever shell the script was written for.<br>> Also, in this case, the starting point is not the ocf-* script, but the original RA (IPaddr, but almost all of them).<br>> What about making the code base of RA and ocf-* portable?<br>> 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.<br>> Meanwhile, changing the scripts by hands into #!/bin/bash worked like a charm, and I will start patching.<br>> Gabriele<br><br>Hi Gabriele,<br><br>Yes, your observation is correct: The resource scripts are not fully<br>POSIX compatible in this respect. We have been fixing these issues as<br>they come up, but since we all use bash-like shells it has never become<br>a pressing issue (IIRC Debian did have some of the same issues since<br>/bin/sh there is dash, which is also not fully bash-compatible).<br><br>It would be fantastic if you could file issues or submit patches at<br>https://github.com/ClusterLabs/resource-agents for the resource agents<br>where you still find these problems.<br><br>Cheers,<br>Kristoffer<br><br>-- <br>// Kristoffer Grönlund<br>// kgronlund@suse.com<br><br><br></tt></blockquote></div>