Commit Graph

5 Commits

Author SHA1 Message Date
Michael Biebl
93417d9013 Use more consistent shell script headers
Gbp-Dch: Ignore
2020-01-31 10:46:58 +01:00
Michael Biebl
10952c547d Update the checks which test if systemd is the active init.
The recommended check is [ -d /run/systemd/system ] as this will also
work with a standalone systemd-logind.
2013-06-20 01:17:00 +02:00
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
Michael Biebl
77e933b50e Fix prerm to only err out on remove 2012-12-16 22:24:42 +01:00
Tollef Fog Heen
c3f5f24967 Prevent the systemd package from being removed if it's the active init system, since that doesn't work. 2012-12-01 18:42:52 +01:00