systemd/debian/systemd.install
Michael Biebl d7e5781795 Use a file trigger to automatically enable service and socket units
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
2013-02-09 16:42:15 +01:00

54 lines
1.5 KiB
Plaintext

etc
bin/systemctl
bin/systemd-journalctl
bin/systemd-notify
bin/systemd-tty-ask-password-agent
bin/systemd-ask-password
bin/systemd-machine-id-setup
bin/systemd-tmpfiles
bin/systemd-loginctl
lib/systemd/
lib/udev/rules.d/
usr/bin/systemd-cgls
usr/bin/systemd-cgtop
usr/bin/systemd-nspawn
usr/bin/systemd-stdio-bridge
usr/bin/systemd-analyze
usr/bin/systemd-cat
usr/share/man/man1/systemd-notify.1
usr/share/man/man1/systemd-cgls.1
usr/share/man/man1/systemd-cgtop.1
usr/share/man/man1/systemd.1
usr/share/man/man1/systemctl.1
usr/share/man/man1/systemd-nspawn.1
usr/share/man/man1/systemd-ask-password.1
usr/share/man/man1/systemd-loginctl.1
usr/share/man/man1/systemd-machine-id-setup.1
usr/share/man/man1/systemd-cat.1
usr/share/man/man1/systemd-journalctl.1
usr/share/man/man3
usr/share/man/man5
usr/share/man/man7
usr/share/man/man8/systemd-tmpfiles.8
usr/share/dbus-1
usr/share/doc
usr/share/pkgconfig
usr/share/polkit-1
usr/share/systemd/kbd-model-map
usr/lib/binfmt.d
usr/lib/modules-load.d
usr/lib/sysctl.d
usr/lib/systemd
usr/lib/*/systemd
usr/lib/tmpfiles.d
debian/init-functions.d/40-systemd /lib/lsb/init-functions.d
debian/debian-fixup lib/systemd/
debian/debian-fixup.service lib/systemd/system
debian/tmpfiles.d/debian.conf usr/lib/tmpfiles.d
debian/ifup@.service lib/systemd/system
debian/units/run-lock.mount lib/systemd/system/
debian/units/run-user.mount lib/systemd/system/
debian/unit.blacklist usr/share/systemd/
debian/debian-enable-units lib/systemd/
debian/debian-enable-units.service lib/systemd/system/