Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6058 - autofs script does not remove the comments correctly
Summary: autofs script does not remove the comments correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Bugzilla (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-05 15:33 UTC by André Luiz Pfitzner
Modified: 2011-10-30 23:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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