Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91104 - autofs init script failing cause of daemon options
Summary: autofs init script failing cause of daemon options
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
: 145056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-01 20:38 UTC by Ryan Winter
Modified: 2008-02-05 12:38 UTC (History)
7 users (show)

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 Ryan Winter 2005-05-01 20:38:55 UTC
In version autofs-4.1.3-r4.ebuild, the init scripts were revamped, and now it is unable to parse my daemon options.

The daemon options are: "-ro,soft,intr", the 't' in soft is intepreted as a timeout flag with options ",intr".

Reproducible: Always
Steps to Reproduce:
1. Set daemon options to "-ro,soft,intr" for one of the mounts
2. Start the autofs init

Actual Results:  
 /home/usr/sbin/automount: option -t requires a numeric argument, got ,intr
 * Failure on /home



It seems to come down to the command getopt not doing the expected
Comment 1 Mark Keisler 2005-05-03 15:10:40 UTC
actually, --timeout 60 was added as a default setting in the /etc/conf.d/autofs file.  The new init script seems to not play well with options in the NIS map or flat file if you start them with a '-' like normal.  If you remove the dash, it works fine.  With the dash in place, it does weird things.  Example auto.master entry:
/apps/public auto.appspublic   -rw,intr,nobrowse

Command that /etc/init.d/autofs tries to run:
/usr/sbin/automount --timeout r,nobrowse --pid-file /var/run/autofs.apps.public.pid /apps/public yp auto.appspublic -rw,intr,nobrowse
Comment 2 Ryan Winter 2005-05-06 01:41:29 UTC
Yeah I noticed that removing the '-' makes it all work. I did a search and all example include this flag though. Maybe something to do with the some of the linux clients using autofs 3.
Comment 3 Max Loparyev 2005-05-11 01:26:03 UTC
so, why we can't use ${options/-/} in getopt_input as workaround?
Comment 4 Ryan Winter 2005-05-11 08:51:13 UTC
sounds good to me, who has access to make the change?
Comment 5 José María Fernández González 2005-09-01 09:16:31 UTC
I'm working on a research group where we have a mixure of Debian, Ubuntu and
Gentoo machines (among other) and we are using YP + autofs.

With autofs-4.1.3-r4 I have the same problem you have described in the bug. I
have modified /etc/init.d/autofs taking into account the advice from Max
Loparyev  (comment #3), and now it is working. The only modification was adding
options=${options/-/} to getmounts function, just inside the while loop.
Comment 6 Paulo J. Matos 2005-10-27 05:10:42 UTC
I'm having the same problem after emerging uD world. Strange how an app with
this bug is put in portage as stable. I'm using NIS + NFS
Oh well, 
I have:
# ypcat -k auto.master
/home auto.home -t 60 -rw,soft,intr,nosuid,rsize=8192,wsize=8192
/net auto.net   -t 60 -rw,soft,intr,nosuid,rsize=8192,wsize=8192
# /etc/init.d/autofs stats
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout ,intr,nosuid,rsize=8192,wsize=8192 --pid-file
/var/run/autofs.home.pid /home yp auto.home
-rw,soft,intr,nosuid,rsize=8192,wsize=8192
/usr/sbin/automount --timeout ,intr,nosuid,rsize=8192,wsize=8192 --pid-file
/var/run/autofs.net.pid /net yp auto.net -rw,soft,intr,nosuid,rsize=8192,wsize=8192

Active Mount Points:
--------------------

Which results in the numerical argument error to automount. The problem is I
cannot find a workaround to this. Someone said to "use ${options/-/} in
getopt_input" but I cannot find getopt_input. And I cannot remove '-' since I
don't know where is the config files. I tried to find everywhere in my maching
but couldn't find it. Occured to me it could be information provided by the
server in which case I cannot change. Any ideas?
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-08-25 02:33:13 UTC
*** Bug 145056 has been marked as a duplicate of this bug. ***
Comment 8 t35t0r 2007-01-03 19:10:09 UTC
Someone please make a new revision and put it into portage asap! ${options/-/} in getopt_input works well.
Comment 9 Stefaan De Roeck (RETIRED) gentoo-dev 2008-02-03 11:39:30 UTC
New maintainer, net-fs/autofs-5.0.3-r1 is now in the tree.  
Comment 10 Stefaan De Roeck (RETIRED) gentoo-dev 2008-02-03 11:45:26 UTC
Is there still a demand for this?  Or can we all just as well upgrade to autofs-5 (which I guess doesn't have this problem, as the init script is, again :), completely new)
Comment 11 Mark Keisler 2008-02-03 21:47:57 UTC
It is a super simple fix, so I don't see why it can't be done.  It is sad that this languished for so long.
Comment 12 Ryan Winter 2008-02-04 07:48:17 UTC
(In reply to comment #11)
> It is a super simple fix, so I don't see why it can't be done.  It is sad that
> this languished for so long.

Sad is probably not the word I would use :)
Comment 13 Stefaan De Roeck (RETIRED) gentoo-dev 2008-02-05 12:38:18 UTC
(In reply to comment #12)
> Sad is probably not the word I would use :)

You are always welcome to spend some of your own free time at fixing bugs, becoming a gentoo developer is an easy enough process...

Fixed in net-fs/autofs-4.1.3-r9