nbd-client and systemd

Wouter Verhelst wouter at debian.org
Wed Jul 15 08:34:09 BST 2015


Hi folks,

nbd-client ships with an init script that does two things:
- If we're doing root-on-NBD, write the correct sysvinit sendsigs.omit.d file
  so that the nbd-client process serving the root filesystem doesn't get killed
  from under us at shutdown
- Connect nbd devices based on configuration in /etc/nbd-client.

The former just needs to happen at some time before shutdown, so it
doesn't really matter when this happens. Also, for systemd this isn't
required, instead we need to change our argv[0] to get the same
functionality, which has already happened for nbd-client in 1:3.8-2.

The latter requires that it at a point before mountnfs.sh (since we set
the option _netdev), so that we just need to deal with connecting (and
mountnfs.sh will deal with mounting). This requires nbd-client to be an
rcS.d script.

I talked to systemd upstream a while back, and they suggested that I
create an nbd unit generator thingamajing, which would work similarly to
fstab-generator. I've been looking into this, but it hasn't happened
yet, mainly due to lack of time. However, recently I found out about the
systemd-no-service-for-init-rcS-script lintian error, which triggers for
nbd-client. I'm afraid that if I create such a unit generator, this
would still trigger.

Is that correct? If so, is there another way in which I can ship an
nbd-client initscript for the benefit of !systemd installations, while
still not using it for systemd installations? Dropping that init script
is not something I wish to do.

Thanks,

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26



More information about the Pkg-systemd-maintainers mailing list