Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18455 - init.d/autofs reload gives warnings
Summary: init.d/autofs reload gives warnings
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Aron Griffis (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-29 19:19 UTC by Aron Griffis (RETIRED)
Modified: 2004-05-06 12:25 UTC (History)
1 user (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 Aron Griffis (RETIRED) gentoo-dev 2003-03-29 19:19:45 UTC
sage /etc # /etc/init.d/autofs reload
Reloading automounter: checking for changes ... 
Stopping automounter: /misc ?        D      0:00 /usr/sbin/automount /misc file
/etc/autofs/auto.misc
 * WARNING:  "autofs" has already been started.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2003-05-06 14:02:39 UTC
There are multiple problems here:

1. When restart it called, it sends a SIGUSR2 to the daemon and
   assumes that it has stopped.  Then it starts a new daemon.  However
   if any of the mounts are presently in use, then the first daemon
   won't stop, so you've got two of them running.

2. When reload is called, it kills the automount manually (again with
   SIGUSR2), but doesn't use svc_stop.  The result is that the call to
   svc_start fails because it says that the services is already
   running (this is the actually bug report).

3. The stop function doesn't clean up pid files from /var/run

4. The start function will report [ ok ] even if automount fails to
   start.

In addition to the above, there are the following problems which
affect maintainability but not functionality:

5. The indentation throughout the file is inconsistent.

6. The DAEMON variable is declared at the top but is not consistently
   used.

7. The functions don't declare their variables local

I'm working on fixing these in a partially re-written autofs script.
Comment 2 Andreas Simon 2003-08-19 03:54:00 UTC
I have the same problem with net-fs/autofs-3.1.7-r5. 
After starting autofs I see that autofs.misc.pid (it's my only autofs.*.pid file) has a 
strange content: 
  
# cat /var/run/autofs.misc.pid 
25036 
/misc pts/2    S      0:00 /usr/sbin/automount --timeout 60 /misc file /etc/autofs/
auto.misc 
 
Should'nt it contain only the pid? 
Comment 3 Andreas Simon 2003-08-19 04:35:39 UTC
Forget my last message. I had an invalid configuration, thus automount got started 
but immediately teminated (without removing the pid file). Fixing my configuration 
made it work. The pid file still contains more than the pid but it works. 
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-05-06 12:25:33 UTC
I have no idea whether this still applies and don't plan to investigate it