Commit Graph

18 Commits

Author SHA1 Message Date
Michael Biebl
b7d9be48c0 Handle removal of /var/log/README
Remove /var/log/README symlink when the systemd package is purged.
This symlink is created via tmpfiles and documents that /var/log no
longer contains the traditional syslog text files.

Closes: #877414
2022-09-28 13:38:53 +02:00
Michael Biebl
56407ffb04 Fix systemd-pstore.service enablement symlink on upgrades
It is now started via sysinit.target. Also clean up the symlink on
purge.
2020-04-13 13:57:49 +02:00
Balint Reczey
a3d3aeab62 Remove empty /var/log/journal/ on purge
This keeps piuparts happy
2020-02-07 01:19:46 +01:00
Michael Biebl
ab07209bd6 Fix cleanup of timesyncd state directory 2020-01-31 10:52:02 +01:00
Michael Biebl
21ab41e618 Clean up dbus-org.freedesktop.timesync1.service Alias on purge
Closes: #904290
2018-07-22 20:39:32 +02:00
Michael Biebl
5a0e0244b1 Don't fail in postrm during cleanup if directories don't exist 2015-04-29 16:02:05 +02:00
Martin Pitt
929bece532 Enable timesyncd by default
Add a config drop-in to not start if ntp, openntpd, or chrony is installed.

Closes: #755722
2015-02-16 15:38:40 +01:00
Martin Pitt
46e123691b Clean up leftover symlinks on purge
debian/systemd.postrm: Clean getty@tty1.service and remote-fs.target enablement
symlinks on purge. These are created in the postinst with systemctl enable.

Closes: #778499
2015-02-16 14:49:34 +01:00
Jon Severinsson
b3d4177736 Remove more stuff from /var/lib/systemd on systemd purge. 2014-08-10 15:34:59 +02:00
Daniel Schaal
6853903fe2 Add handling of Message Catalog files.
This compiles the files from /usr/lib/systemd/catalog into a
binary database, which is used by journalctl to provide
additional information for log entries. journalctl only uses
the binary database in /var/lib/systemd/catalog/database.

Call journalctl --update-catalog in systemd.postinst and when
triggered by dpkg to update the Message Catalog database.
Also add systemd.postrm to remove the database on purge.

See http://www.freedesktop.org/wiki/Software/systemd/catalog/
2013-07-21 12:10:48 +02:00
Michael Biebl
47d2341620 Remove the dpkg-triggered debian-enable-units script
This was a temporary workaround for wheezy. Packages should use dh-systemd
now to properly integrate service files with systemd.
Remove the state files on upgrades.
2013-07-18 16:54:22 +02:00
Michael Biebl
c8b9df6d6a Do not fail on purge if /var/lib/systemd is empty and has been removed by dpkg. 2013-03-13 08:05:01 +01: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
Tollef Fog Heen
27bb26a30a Ship lsb init script override/integration in /lib/lsb/init-functions.d
Do this rather than diverting /lib/lsb/init-functions itself.  Add
appropriate Breaks to ensure upgrades happen.
2012-06-30 20:25:16 +02:00
Michael Biebl
e3c0434f4a Use new dh_installdeb maintscript facility to handle obsolete conffiles.
Bump Build-Depends on debhelper accordingly.

Conflicts:

	debian/changelog
2012-02-28 07:57:19 +01:00
Michael Biebl
5db9a9988c Remove obsolete conffiles from /etc/tmpfiles.d on upgrades. Those files are installed in /usr/lib/tmpfiles.d now. 2011-06-29 14:00:03 +02:00
Tollef Fog Heen
a3328de25b Remove diversion of init-functions on downgrade 2011-04-26 21:54:07 +02:00
Tollef Fog Heen
44b765a9e8 Divert lsb init-functions instead of abusing logging hook 2011-04-21 17:19:33 +02:00