[Bug 1552999] [NEW] dh_systemd_enable not able to disable on upgrade
Scott Moser
smoser at ubuntu.com
Fri Mar 4 02:04:56 UTC 2016
Public bug reported:
cloud-init has a service like
== /lib/systemd/system/cloud-init.service ==
[Unit]
Description=Initial cloud-init job (metadata service crawler)
After=local-fs.target network-online.target cloud-init-local.service
Before=sshd.service sshd-keygen.service systemd-user-sessions.service
Requires=network-online.target
Wants=local-fs.target cloud-init-local.service sshd.service sshd-keygen.service
[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init init
RemainAfterExit=yes
TimeoutSec=0
[Install]
WantedBy=multi-user.target
=====
dh_systemd_enable created some files like:
/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/cloud-init.service
I dont think that was necessary as 'WantedBy' in my service file, but
thats fine.
Later I came to want to change the 'WantedBy=' to be 'WantedBy=cloud-
init.target'.
When I installed the new deb, the files in /var/lib/systemd/deb-systemd-helper-enabled/ were still there
so the services where running on multi-user.target when I wanted to change that.
I've since added
override_dh_systemd_enable:
dh_systemd_enable --no-enable
so i'm no longer enabling anything on install, but the files are still there.
The are deleted with --purge, but I need them correctly handled on upgrade.
Whats the proper way to get rid of them?
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: dh-systemd 1.28ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-8.23-generic 4.4.2
Uname: Linux 4.4.0-8-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Mar 3 20:56:22 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (225 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitecture: all
SourcePackage: init-system-helpers
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: init-system-helpers (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug xenial
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to init-system-helpers in Ubuntu.
https://bugs.launchpad.net/bugs/1552999
Title:
dh_systemd_enable not able to disable on upgrade
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/init-system-helpers/+bug/1552999/+subscriptions
More information about the Ubuntu-server-bugs
mailing list