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.
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.
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?
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.
I have no idea whether this still applies and don't plan to investigate it