Re: Proper way to keep service enabled when updated from sysv to systemd?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 13, 2019 at 10:36 AM Zbigniew Jędrzejewski-Szmek
<zbyszek@xxxxxxxxx> wrote:
>
> On Tue, Aug 13, 2019 at 06:02:42PM +0800, Robin Lee wrote:
> > Hi,
> >
> > I packaged xe-guest-utilities with a systemd service for Fedora.
> >
> > But there is an upstream rpm package that include the same service as
> > a sysv one. And the
> > service is enabled with the 'Default-Start' info in the init script
> > after '/sbin/chkconfig --del xe-linux-distribution'.
> >
> > And when people update the package from upstream one to the Fedora
> > one. Since the service changed to a systemd one. The service is then
> > disabled by default without regard to the sysv service.
> >
> > That surprises end users. So the new package should make it compatible
> > in the scriptlets.
> > But which is the proper way?
>
> You can add a %trigger script. Something like this, completely untested:
> %triggerun xe-linux-distribution < …old…version+1…
> if test -e /etc/rc.d/rc3.d/Snn-…; then
>    # enable systemd service based on old status
>    systemctl enable xe-linux-distribution.service
> fi
>
> Please note that for new packages, the general guidelines apply
> (https://docs.fedoraproject.org/en-US/packaging-guidelines/DefaultServices/)
> and services should be managed through presets. But keeping enablement
> state on upgrade is outside of the guidelines and a nice thing to do.
>
> Zbyszek

Or.... Just use "chkconfig" and "service" for both init and systemd
scrupts, until and unless the migation to systemd is stable.
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux