Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 6058

Summary: autofs script does not remove the comments correctly
Product: Gentoo Infrastructure Reporter: André Luiz Pfitzner <alp8>
Component: BugzillaAssignee: Nick Hadaway <grandmasterlinux>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description André Luiz Pfitzner 2002-08-05 15:33:41 UTC
This line from the file "/etc/init.d/autofs":

cat /etc/autofs/auto.master | sed -e '/^#/d' -e '/^$/d'

try to remove all comments and blank lines from auto.master file,
but will not remove lines like:
   # coments
        
several spaces on the line up.
Then I sugest to use the following sed code:
cat /etc/autofs/auto.master | sed -e '/^ *[^# ]/!d'
that will make the service nice. And additionally this code for
cut comments may be have to be inserted on another scripts files.

If have a more nice way to sugest corrections like this, please tell me.
Comment 1 Nick Hadaway 2002-08-14 16:05:09 UTC
I have updated the ebuild with your suggested changes.  Thanks for the 
suggestion! :)  The updated files should be available in portage within 24 
hours.

emerge rsync
emerge autofs
Comment 2 André Luiz Pfitzner 2002-08-31 11:21:43 UTC
Thanks.
Another little change is to use:
sed -e '/^[[:space:]]*[^#[:space:]]/!d'
for get the tabs out, little important. :)
Comment 3 Nick Hadaway 2002-09-01 16:21:46 UTC
reopening bug to test new sed line... :P
Comment 4 Nick Hadaway 2002-10-11 13:40:42 UTC
*** This bug has been marked as a duplicate of 8254 ***
Comment 5 John Davis (zhen) (RETIRED) gentoo-dev 2002-12-17 16:26:11 UTC
owner = raker
Comment 6 John Davis (zhen) (RETIRED) gentoo-dev 2002-12-17 16:26:32 UTC
owner = raker