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

Bug 3931

Summary: autofs init script pidfile error
Product: Gentoo Linux Reporter: Gavin Panella <gavin>
Component: [OLD] Core systemAssignee: Ryan Phillips (RETIRED) <rphillips>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 1.2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gavin Panella 2002-06-20 09:39:20 UTC
In start() it derives a pid file name with this line:

    pidfile=/var/run/autofs`echo $mnt | sed 's/\//./'`.pid

...so if $mnt is something like /foobar/fred it will later try to create
/var/run/autofs.foobar/fred.pid (which fails), rather than
/var/run/autofs.foobar.fred.pid

A solution:

    pidfile=/var/run/autofs`echo $mnt | sed 's/\//./g'`.pid

or perhaps...

    pidfile=/var/run/autofs${mnt//\//.}.pid
Comment 1 Ryan Phillips (RETIRED) gentoo-dev 2002-06-20 16:26:27 UTC
Gavin:

  Can you double check the autofs file found in the autofs/files directory... It
appears to already have a /g at the end of the string.
Comment 2 Gavin Panella 2002-06-21 05:38:20 UTC
It's not there... but I've done some more digging...

The 3.1.7-r3 ebuild is using 'autofs.rc6' rather than 'autofs' in which this bug
is fixed in rev 1.2.  Looks like only the ebuild needs a tweak.

Comment 3 Ryan Phillips (RETIRED) gentoo-dev 2002-06-21 18:11:43 UTC
Changed autofs.rc6:  Added a \g to the regex.