> > On Jun 20, 2007, at 2:50 PM, Brian Smith wrote:
> > HostRange statements seem to be totally broken in my RPM'd
> > (cfengine-2.2.1-1.fc7)
> >
> > bizauth = ( HostRange(bizauth,001-100) )
> >
> > Does not work.
> > [...]
> From: Jeff Sheltren <[EMAIL PROTECTED]>
> Hi Brian, are you using the RPM from Fedora or some other repo? If
> it is the Fedora RPM, I'll be glad to include a patch in it once one
> is available.
Patch follows my sig.
My previous patch for "HostRange with uppercase letters" broke
HostRange with lower case host names. See the ML archive ca
early May 2007.
Sorry for the trouble everyone.
steve
- - -
--- item.c.orig 2007-05-14 15:08:58.000000000 -0500
+++ item.c 2007-06-21 15:00:20.000000000 -0500
@@ -1082,9 +1082,9 @@
return 1;
}
-if (strcmp(refbase,ToUpperStr(arg0)) != 0)
+if (strcmp(ToLowerStr(refbase),ToLowerStr(arg0)) != 0)
{
- Debug("SRDEBUG Failed on name (%s != %s)\n",refbase,ToUpperStr(arg0));
+ Debug("SRDEBUG Failed on name (%s !=
%s)\n",ToLowerStr(refbase),ToLowerStr(arg0));
return 1;
}
--- cfengine-Reference.texinfo.orig 2007-05-04 10:01:11.000000000 -0500
+++ cfengine-Reference.texinfo 2007-06-21 15:07:55.000000000 -0500
@@ -1723,7 +1723,7 @@
@item HostRange(@var{basename,start-stop})
True if the current relative domain name begins with basename and ends with an
integer
-between start and stop. Note well: matching is case insensitive (both
hostname and basename are converted to all upper case for comparison.)
+between start and stop. Note well: matching is case insensitive (both
hostname and basename are converted to all lower case for comparison.)
@item IsDefined(@var{variable-id})
True if the named variable is defined. Note well: use the variable name, not
its contents (that is,
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine