On 2016-08-10 22:38:27 +0200, Marc Haber wrote:
> On Wed, Aug 10, 2016 at 10:17:07PM +0200, Vincent Lefevre wrote:
> > Here the /var/lock/subsys directory doesn't exist, yielding an error
> > message, and the file is not created.
> 
> Can you try changing that to /run/lock/subsys/atop{acctd} respectively
> and re-check? If so, I'm going to patch the init scripts accordingly.

I have not tried, but I don't see how this would solve the problem
since these are equivalent paths: /var/lock is a symbolic link to
/run/lock. And indeed there is no /run/lock/subsys directory.

Replacing /var/lock by /run/lock would be better but would not solve
the problem here.

> As all my systems are systemd, the init scripts are kind of
> undertested. Your efforts are appreciated.

FYI, I have an Ubuntu 14.04 machine, thus with upstart, and there is
no /run/lock/subsys either.

It seems that /run/lock/subsys is specific to systemd and created
via /usr/lib/tmpfiles.d/legacy.conf (part of systemd), which
contains in particular:

------------------------------------------------------------------------
# /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems.

d /run/lock/subsys 0755 root root -
------------------------------------------------------------------------

See the tmpfiles.d(5) man page for details.

What is the goal of theses .../subsys commands in /etc/init.d/atop*?
If systemd specific, shouldn't they run only if the /run/lock/subsys
directory exists?

  if [ -d /run/lock/subsys ]; then
    ...
  fi

Note also that the following searches return no results:

  https://codesearch.debian.net/search?q=run+lock+subsys
  https://codesearch.debian.net/search?q=var+lock+subsys

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to