On Sun, 31 Jul 2016 02:16:38 +0000, Chris Knadle wrote: > What I think might be helpful here is the dh-systemd package, > specifically the dh_systemd_enable command: > > Package: dh-systemd > [...] > Description-en: debhelper add-on to handle systemd unit files > dh-systemd provides a debhelper sequence addon named 'systemd' and the > dh_systemd_enable/dh_systemd_start commands. > . > The dh_systemd_enable command adds the appropriate code to the > postinst, prerm and postrm maint scripts to properly enable/disable > systemd service files. > The dh_systemd_start command deals with start/stop/restart on upgrades > for systemd-only service files.
I've been wading through the documentation and code of /usr/share/perl5/Debian/Debhelper/Sequence/systemd.pm and /usr/bin/dh_systemd_enable and /usr/share/debhelper/autoscripts/postinst-systemd-enable - and interesting the snippet doesn't end up in the postinst. Hm. > - The postinst script runs 'systemctl enable iodined.service' > upon installation, and I think this could be done conditionally > based on the contents of the enable/disable env variable in > the /etc/default file. Except that this systemctl code is missing. Maybe I'm doing something wrong in d/rules, or this has changed with the move from dh-system to debhelper. But I also started looking at deb-systemd-helper (in init-system-helpers) and found an interesting example: https://sources.debian.net/src/isatapd/0.9.7-2/debian/postinst/?hl=12#L12 Maybe this is the way to go? (And if yes: "disable" or "mask"?) Cheers, gregor -- .''`. Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Pink Floyd: Wish You Were Here
signature.asc
Description: Digital Signature

