From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 Description of problem: Hi, I was having trouble with the /etc/init.d/autofs script not setting the timeout correctly. I believe I've traced it down to the following line: if echo "$options" | grep -qE -- '\B-(t\b|-timeout\b=)' ; It seems that this works fine in FC2, but not in FC3. Version-Release number of selected component (if applicable): rpm-2.5.1-31.2 How reproducible: Always Steps to Reproduce: 1. options="--timeout=600" 2. if echo "$options" | /bin/grep -qE -- '\B-(t\b|-timeout\b=)' ; then echo yes; else echo no; fi Actual Results: no Expected Results: yes Additional info: This script works fine on FC2 and RHEL 3U3
It is correct that no match is found: ==> #include <error.h> #include <regex.h> #include <stdlib.h> #include <stdio.h> #include <sys/types.h> void r_error (int e, regex_t *rc) { char msg[200]; regerror (e, rc, msg, sizeof (msg)); msg[sizeof (msg) - 1] = '\0'; error (1, 0, "%s", msg); } int main () { int e; regex_t rc; if ((e = regcomp (&rc, "\\B-(t\\b|-timeout\\b=)", REG_EXTENDED)) != 0) r_error (e, &rc); else if ((e = regexec (&rc, "--timeout=500", 0, NULL, 0)) != 0) r_error (e, &rc); return 0; } <== $ make re cc re.c -o re $ ./re ./re: No match
Thanks. :-) I guess I'll file this as a bug for the autofs folks.