Description of problem: /etc/init.d/autofs fails to use command-line arguments from /etc/sysconfig/autofs under some situations. Version-Release number of selected component (if applicable): 4.1.3-47 (and, I think, autofs-4.1.3-130 too) How reproducible: Easily Steps to Reproduce: 1. Change the appropriate line in /etc/sysconfig/autofs to the following DAEMONOPTIONS="--debug --timeout=30" 2. Reboot the machine 3. Run "ps -wwwaux | fgrep autofs" Actual results: The "--debug" command-line parameter won't be given to the automount processes. Expected results: All automount process should have a "--debug" parameter in the ps output. Additional info: From my reading of the grep man page, it seems all regular expressions with a '\B' in autofs/sample/autofs.rc.in are wrong - it looks like it's being used as "beginning of word" when I think it means "not edge of word". IMPORTANT - using \< and /> also has issues - whether a leading "-" is considered part of a word is also LANG dependent. One possible solution is to add " " to all of the stdin's that are grepped and break based on whitespace, but I haven't got a full patch yet. Also note that another sypmtom of this bug is that sometimes "/etc/init.d/autofs status" and "service autofs status" give different results, which is somewhat confusing. I think it's env variable related - SHELL and LANG stuff affect it - but this should go away if the main issue is fixed.
This bug should be fixed in 4.1.3-130. Please retest. Here is the relevant changelog entry: - Different locales impart different meanings in terms of what characters are said to be "word" characters and which are not. The intention of the code is that LC_ALL is set to C. This patch does this so that the grep's will work properly. - This fixes problems whereby --ghost options were not recognized when specified in /etc/sysconfig/autofs.
This does indeed fix the symptoms. But it doesn't actually fix the cause. With the. 4.1.3-130 code, putting e.g. "--not--verbose" in sysconfig will still set the verbose flag, which is obviously not what the script writer intended. The code on e.g. line 252 of /etc/init.d/autofs in 4.1.3-130 says (in pseudo-regexp): ::not_edge_of_word::-(v::edge_of_word::|-verbose::edge_of_word::) This works becaude the edge of word is between the "-" and the "v", so saying ::not_edge_of_word:: at the beginning doesn't break it, but it's not really doing what you want. It seems that if LC_ALL==C then "-" is not part of a word but the regexp is written as if it should be, but also as if \B means ::beginning_of_word:: (which according to the grep man page it doesn't). Feel free to call me on 510-666-2983 if my explanation isn't clear.
Thank you for taking the time to explain this. However, if this bug does not rear its ugly head in the wild, it is not going to be considered for an update release. Feel free to do either or both of the following: o Propose a patch upstream (autofs.org) o Change the "Product" field of this bug to Fedora, and propose a patch. The patch will be gladly accepted. Thanks.
Created attachment 117210 [details] Patch for bad use of "grep \B" in autofs init script
I've attached a patch that worked for me on RHEL3. I've not idea which version of FC this'll work on, i.e. which includes autofs-4.1.3-130 or similar, so I'll let you guys switch the product to something more appropriate.
Thanks!
(In reply to comment #5) > I've attached a patch that worked for me on RHEL3. I've not idea which version of > FC this'll work on, i.e. which includes autofs-4.1.3-130 or similar, so I'll let > you guys switch the product to something more appropriate. David, autofs no longer does this parsing in the init script. Can you check the functionality in either FC6 test1 or Rawhide and let me know if a problem is still present.
Based on the date this bug was created, it appears to have been reported against rawhide during the development of a Fedora release that is no longer maintained. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained. If this bug remains in NEEDINFO thirty (30) days from now, we will automatically close it. If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide), please change this bug to the respective version and change the status to ASSIGNED. (If you're unable to change the bug's version or status, add a comment to the bug and someone will change it for you.) Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
This bug has been in NEEDINFO for more than 30 days since feedback was first requested. As a result we are closing it. If you can reproduce this bug in the future against a maintained Fedora version please feel free to reopen it against that version. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp