From: Henrik S. <he...@hs...> - 2012-05-03 07:39:42
|
Hi, yes - I've seen it, thanks. But I think it is wrong. If you look at the configure.server script (in 4.3.7) it goes like this: OPT="$1"; shift case "$OPT" in "--rrdinclude") USERRRDINC="$1"; shift ;; Note the "shift" after it picks up the OPT setting - this shifts all the positional parameters 1 position down, so $2 becomes $1, $3 becomes $2 etc. So this should pick up the parameter *after* "--rrdinclude" and assign it to USERRRDINC, even though it refers to "$1" in both cases. And testing it also seems to do the right thing: henrik@osiris:~/xymon/4.3.7$ sh -x ./configure.server --rrdinclude /opt/rrd/include --rrdlib /opt/rrd/lib + echo + echo Configuration script for Xymon Configuration script for Xymon + echo + test --rrdinclude != + OPT=--rrdinclude + shift + USERRRDINC=/opt/rrd/include + shift + test --rrdlib != + OPT=--rrdlib + shift + USERRRDLIB=/opt/rrd/lib + shift + test != Regards, Henrik On 03-05-2012 08:54, User Xymon wrote: > Hello, > > Does someone see this tiny patch ? > > Although it is minor and my patch may be confusing, I was wondering :-) > > Arnaud > > Begin forwarded message: > >> *Date: *March 20, 2012 7:51:42 PM CEST >> *To: *xym...@li... >> <mailto:xym...@li...> >> *Subject: **[configure.server] Wrong positional parameter for script >> options* >> >> Hello, >> >> In configure.server, a wrong positional parameter is used and prevent >> the script options from setting any custom location. >> >> Here's a patch that corrects it. >> >> Arnaud |