Bug 117672

Summary: autofs --timeout can not work
Product: [openSUSE] SUSE Linux 10.1 Reporter: Guido Draheim <guido.draheim>
Component: BasesystemAssignee: Jeff Mahoney <jeffm>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: guido.draheim
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 204411    
Attachments: rcautofs - modifying sed to allow timeout settings

Description Guido Draheim 2005-09-18 13:55:16 UTC
The installed file:/etc/auto.master 
does contain an example line 
#/misc  /etc/auto.misc --timeout=60

Specifying such a timeout will not work.
It will result in bogus error messages
about failed mounts. The reason is in
file:/usr/sbin/rcautofs
where the provided "sed" commands do
not contain a "=" for detecting the
"t(imeout)" options.

As a result, any such -timeout= will be
handed down as a mount option for the 
autofs driver (!!) - which fails
horribly since the timeout option is
meant for the autofs daemon only.

== HOW TO FIX ==
I was thinking about sending you a patch
but in reality that file is a 90% suse 
development caused by the rpm patch 
file:/usr/src/packages/SOURCES/autofs4-init.diff

You can easily check a good working rcautofs
by doing a test via calling the service status
option - it will show you the result of parsing
the auto.master file in the format the daemon
would be called.

Therefore, just include the example line in the
auto.master file (that includes a trailing
--timeout=60 option) and run
`sudo /etc/init.d/autofs status`

CORRECT FORMAT:
pc3:/home/guidod # /etc/init.d/autofs status
Checking for service autofs:                                          running
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout 60 /misc file /etc/auto.misc

Active Mount Points:
--------------------
/usr/sbin/automount --timeout 60 /misc file /etc/auto.misc

WRONG OUTPUT:
/usr/sbin/automount /misc file /etc/auto.misc timeout=60

Good luck in fixing the bug you introduced.
(by the way, I was reporting a similar bug a year ago to
mandrake, which were telling me to contact the upstream
maintainer. According to the text being replaced by your 
patch the upstream rcautofs file is now correct). 
-- dipl.inf. guidod drahiem
Comment 1 Guido Draheim 2005-10-03 08:10:15 UTC
No work here? It is really simple - just modify the sed regex.
(and remove the bogus removal of the a "something" before)

The patch is just three lines, adding four chars. 

I am attaching a diff but remember that you can not put this 
in as a patch due to your rpm packaging (Needs patch merging).


Comment 2 Guido Draheim 2005-10-03 08:15:02 UTC
Created attachment 51312 [details]
rcautofs - modifying sed to allow timeout settings
Comment 3 Guido Draheim 2006-05-16 22:08:37 UTC
The bug is still there. 
This time it is for the new release 10.1.

IT IS REALLY EASY TO FIX. Just modify YOUR patch.
Two years back I did first report the problem and I was told 
to contact the upstream maintainer. I did. He fixed it. But
the suse rcinit patch was based on a version before that.
And the suse patch has never been revised to follow. Not
even for a new release. Hello? Anybody out there? *bg*
Comment 5 Jeff Mahoney 2006-08-29 15:22:32 UTC
Hi Guido -

My apologies for how long this has taken to be addressed. This bug landed on in my queue a few days ago.

I've applied your patches and generated RPMs posted at:
ftp://ftp.suse.com/pub/people/jeffm/suse/testpkgs/117672/

Could you please choose the correct one for your platform, test it, and post your results?
Comment 6 Guido Draheim 2006-09-05 05:40:18 UTC
Hi Jeff,

I did download the new rpms - but I did skip installing them right away.
An eyeball check on the enclosed /etc/init.d/autofs reveals that the
patching has been left INCOMPLETE. 

Let's remember the mode - there are 4 sed-lines with a pattern like 
.. "-t\(imout\)*[ \t]*"
which should be transformed into
.. "-t\(imout\)*[ \t=]*"
The current tarball has replaced some 2 out of 6 (for $mountoptions scanning)
while leaving the other 4 out of 6 in the wrong state (for $options scanning).
Effectivly the auto.* map's optionstring is cut in two - the timeout part goes
to the automount(8) daemon while the rest is pushed through to mount(8).

Please have an eyeball check on the resulting file in the rpm - it 
should be pretty easy to see the point I am trying to make.

Have fun, -- Guido
Comment 7 Jeff Mahoney 2006-09-05 12:27:58 UTC
Of course, you're right. I've updated the RPMs on the FTP site with all the occurences fixed.
Comment 8 Guido Draheim 2006-09-06 01:23:14 UTC
done testrun -> seems to fixed -> resolved
Comment 9 Jeff Mahoney 2006-09-07 17:39:08 UTC
Ok, committing the fix. It will be included in our next release.