Unfortunately this is causing BSC to fail :( I have come up with a better fix, and will commit it after having enough test tomorrow (China time).
On 1/16/06, linux-ha-cvs@lists.linux-ha.org <linux-ha-cvs@lists.linux-ha.org> wrote: > linux-ha CVS committal > > Author : sunjd > Host : > Project : linux-ha > Module : resources > > Dir : linux-ha/resources/heartbeat > > > Modified Files: > hto-mapfuncs.in > > > Log Message: > The fixing to bug 1034: ra_execocf can't deal with the env parameter whose > value includes blank > =================================================================== > RCS file: /home/cvs/linux-ha/linux-ha/resources/heartbeat/hto-mapfuncs.in,v > retrieving revision 1.10 > retrieving revision 1.11 > diff -u -3 -r1.10 -r1.11 > --- hto-mapfuncs.in 14 Nov 2005 07:32:04 -0000 1.10 > +++ hto-mapfuncs.in 16 Jan 2006 10:16:20 -0000 1.11 > @@ -117,23 +117,31 @@ > } > > ra_setenv(){ > - > - for envar in $* > - do > - setup_OCF_prefix $envar > + i=1 > + hbvarname=`echo "$*" | cut -d${PARAMETER_SPLIT_SIGN} -f$i` > + while [ 1==1 ]; do > + let i=i+1 > + hbvarvalue=`echo "$*" | cut -d${PARAMETER_SPLIT_SIGN} -f$i | > fmt -u` > + let j=i+1 > + nextvarvalue=`echo "$*" | cut -d${PARAMETER_SPLIT_SIGN} -f$j` > + if [ ! -z "$nextvarvalue" ]; then > + k=`echo $hbvarvalue | wc -w` > + nextvarname=`echo $hbvarvalue | cut -d" " -f$k` > + let k=k-1 > + havarvalue=`echo $hbvarvalue | cut -d" " -f1-$k` > + > + ocfvarname="OCF_RESKEY_${hbvarname}" > + export `echo $ocfvarname`="$havarvalue" This kind of export is said to be incompatible with Bourne shell :( Hence we may use only eval here. > + hbvarname=$nextvarname > + continue > + else > + ocfvarname="OCF_RESKEY_${hbvarname}" > + export `echo $ocfvarname`="$hbvarvalue" > + return > + fi > done > } > > -setup_OCF_prefix(){ > - > - hbvarname=`echo "$envar" | cut -d${PARAMETER_SPLIT_SIGN} -f1` > - hbvarvalue=`echo "$envar" | cut -d${PARAMETER_SPLIT_SIGN} -f2` > - ocfvarname="OCF_RESKEY_${hbvarname}" > - > - eval $ocfvarname=$hbvarvalue > - export $ocfvarname > -} > - > setup_OCF_env_vars(){ > hbvarname=`echo "$1" | cut -d${PARAMETER_SPLIT_SIGN} -f1` > hbvarvalue=`echo "$1" | cut -d${PARAMETER_SPLIT_SIGN} -f2` > > > _______________________________________________ > Linux-ha-cvs mailing list > Linux-ha-cvs@lists.linux-ha.org > http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs > -- Thanks & regards Xun Sun _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/