A lot of packages simply install systemd units but do not enable them.
Running "systemctl enable" in the maintainer scripts is not really an
option since it is not guaranteed that systemd is installed. We
therefore implement a workaround for wheezy which is supposed to go away
in jessie once we have the necessary tools support in debhelper etc.
What the proposed workaround does is:
- Install a dpkg file trigger for /lib/systemd/system which triggers a
script named /lib/systemd/debian-enable-units every time a package
installs a systemd unit.
- Run this script also upon initial installation of systemd and once on
upgrades from earlier releases.
The script in particular does the following:
- Run "systemctl enable" for each service or socket it finds in
/lib/systemd/system but does that only once, so the administrator can
disable them if wanted.
- Record the state and installed symlinks. When a package shipping
systemd units is uninstalled, we remove those symlinks again.
- Use a blacklist for internal services.
- If systemd is not the active init, it will only create a tag file
and next time we boot with systemd, the script will be run early
during boot. For that we install a service named
debian-enable-units.service which is run in basic.target.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692150
Mounting remote filesystems, like NFS, via /etc/fstab using _netdev is
currently broken for two reasons:
- The nfs-common and rpcbind init scripts aren't correctly ordered
because rpcbind uses an insserv specific configuration file which
systemd doesn't parse, to define the $portmap system facility.
As a result nfs-common is started too early, before rpcbind is
running, and so the rpc.statd daemon simply exits.
- systemd automatically mounts filesystems with the _netdev option via
remote-fs.target. This target should block until network.target is
active. The network.target is currently not properly hooked up so
systemd tries to mount those filesystems too early, when the network
is not yet up. The result is a timeout during boot and a failed mount
attempt.
This workaround does the following:
- Since the only provider for the portmap facility is the rpcbind
init script, we map this directly to rpcbind.service instead of
rpcbind.target. This ensures correct odering for init scripts using
Required-Start: $portmap.
- Remote mounts are no longer hooked up in the remote-fs.target, ie.
they are not started by systemd anymore. Instead we rely on the
if-up.d mountnfs hook to mount those types of filesystems.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673309
The mount/util-linux version in wheezy is not recent enough to support
the new x-systemd* syntax. It requires util-linux 2.21 or newer with the
--enable-new-mount option enabled.
Once we have such a version in Debian, this commit should be reverted
again.
The killing worked fine with the added "control" sub-cgroup, but that
brought other problems:
https://bugzilla.redhat.com/show_bug.cgi?id=816842
The "control" sub-cgroup had to be removed. In order not to
reintroduce https://bugzilla.redhat.com/show_bug.cgi?id=805942,
comment out the killing for F17 GA. Hopefully we'll get a proper fix
later.
Almost a revert of commit 8f53a7b8ea
"service: brutally slaughter processes that are running in the cgroup
when we enter START_PRE and START"