![](https://seccdn.libravatar.org/avatar/06ea97a8bcc88e96378b1f27ddd94bdc.jpg?s=120&d=mm&r=g)
Yamaban <foerster@lisas.de> writes:
On Wed, 17 Aug 2016 12:09, Marcus Meissner wrote:
Hi,
Is there a systemd way to migrate service files and keep enabled state?
E.g. We are planning a hawk -> hawk2 migration and would like to transfer the hawk enabled state to hawk2.
(Or use something like systemctl status hawk.service || systemctl enable hawk2.service or so)
The following works, but is not ideal:
in spec-file, before uninstaling hawk, after installing hawk2:
systemctl is-enabled hawk.service && systemctl enable hawk2.service
be aware of "--root=PATH", it may be needed
The description of the problem is not quite right: We've dropped the hawk package in favor of the hawk2 package (they were co-existing at the same time for a while, but hawk 1 is outdated now). They both provide the hawk systemd service. So a user upgrading will get moved to the hawk2 package, but if the hawk service was enabled before the upgrade, it is now disabled. Cheers, Kristoffer
- Yamaban -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- // Kristoffer Grönlund // kgronlund@suse.com