On Tue, 10 Feb 2004, Henry Baragar wrote: > > The correct way to remove a service called "imap" is: > > > > cd /service/imap > > mv /service/imap /tmp > > svc -dx . log > > This differs from the author's recommended procedure for removing a > service. See http://cr.yp.to/daemontools/faq/create.html#remove.
Yes, but many (I think including binc RPMs) don't install the service directory in one place and use symlinks from /service to start them, like DjB also recommends. If /service/imap is a directory, rm won't work. Hence the difference. :) My method works for both types of installation, while the procedure given there only works for some. NB, there is one caveat with the above method. You have to make sure that the source and target directories used in the "mv" operation are on the same filesystem. If /tmp is a different partition than /service, it might not work. While we're discussing this, it should be noted that creating a directory directly under /service may lead to trouble with logging. If you do this: mkdir /service/NAME mkdir /service/NAME/log then svscan may have detected /service/NAME and seen that there is no logging-directory in it before you complete the second mkdir (race condition), and then logging will not work. If you want to put the directory in /service, I recommend doing something like this: mkdir /tmp/NAME mkdir /tmp/NAME/log cp runfile /tmp/NAME cp logrunfile /tmp/NAME/log mv /tmp/NAME /service # atomic move, must not cross filesystems As you can see, this complicates matters, and is probably another reason why the author recommends using symlinks. But you can use directories if you know what you are doing. :) Ketil Froyn [EMAIL PROTECTED] http://ketil.froyn.name/
