On Sun, 17 Aug 2008, Lars Marowsky-Bree wrote:
On 2008-08-13T10:24:14, Simon Horman [EMAIL PROTECTED] wrote:
Sorry, I've poked around a bit further and I no longer think that
local is POSIX.
People should simply chose whatever language it is they want to write
their scripts in and
(Sorry for delay, away on family holiday and other things; back today.)
On Mon, 11 Aug 2008, Lars Marowsky-Bree wrote:
On 2008-08-07T09:41:25, David Lee [EMAIL PROTECTED] wrote:
var1=XXX
var2=YYY
my_function() {
_mf_v1=$1
_mf_v2=$2
}
your_function()
On 2008-08-13T10:24:14, Simon Horman [EMAIL PROTECTED] wrote:
Sorry, I've poked around a bit further and I no longer think that
local is POSIX.
People should simply chose whatever language it is they want to write
their scripts in and declare that in the #! line, be it bash, sh, ksh,
csh,
On 2008-08-07T09:41:25, David Lee [EMAIL PROTECTED] wrote:
var1=XXX
var2=YYY
my_function() {
_mf_v1=$1
_mf_v2=$2
}
your_function() {
_yf_v1=$1
_yf_v2=$2
}
Pragmatically most sh-programming things are fine with such conventions;
the
On Wed, 6 Aug 2008, Dejan Muhamedagic wrote:
On Wed, Aug 06, 2008 at 02:42:10PM +0100, David Lee wrote:
[...]
+ local rnd=$RANDOM
[...]
That local ... construction: is that a true Bourne feature? In this
shellfuncs area, we need to be as portable as possible, avoiding
On Thu, Aug 07, 2008 at 09:41:25AM +0100, David Lee wrote:
On Wed, 6 Aug 2008, Dejan Muhamedagic wrote:
On Wed, Aug 06, 2008 at 02:42:10PM +0100, David Lee wrote:
[...]
+ local rnd=$RANDOM
[...]
That local ... construction: is that a true Bourne feature? In this
In some environments, such as dash, $RANDOM is empty.
This fixes up the last two references that I could find
in the tree to $RANDOM to make sure they are sensible in
this case.
Signed-off-by: Simon Horman [EMAIL PROTECTED]
Index: heartbeat/resources/OCF/.ocf-shellfuncs.in
On Wed, 6 Aug 2008, Simon Horman wrote:
In some environments, such as dash, $RANDOM is empty.
This fixes up the last two references that I could find
in the tree to $RANDOM to make sure they are sensible in
this case.
(Disclaimer: my mind is even less focussed than usual, having had a week's