Mailinglist Archive: opensuse-packaging (43 mails)

< Previous Next >
Re: [opensuse-packaging] Upgrade path from xinetd to systemd socket-activated service
On čtvrtek 22. března 2018 16:09:52 CET Thorsten Kukuk wrote:
On Thu, Mar 22, Michal Srb wrote:

Some time ago I converted the VNC service in xorg-x11-Xvnc package from
being a xinetd service to be a socket-activated systemd service.

However this change does not preserve the enabled state - people who had
VNC enabled and upgrade get it disabled again. Is there some preferred
way to transfer the "enabled" state during such upgrade?

My idea so far is to check for /etc/xinetd.d/vnc.rpmsave in %post. If it
exist and the service inside was enabled, then enable the systemd socket.
Better is to check in %pre, if /etc/xinetd.d/vnc exist and the
service was enabled and store that for the %post install section.

I would never relay on the rpmsave file: could be that for whatever
reasons it will not be created, or it is very old and the admin
did disable the systemd socke for vnc meanwhile, since he does not
need the service anymore.

Actually I just discovered that /etc/xinetd.d/vnc still exists during %post
and is only renamed to vnc.rpmsave after %post. So it is perfect for my
usecase - it will be there only during the first upgrade from the xinetd
version to the systemd version. Any following upgrades won't see the file, so
they won't re-activate the service.

So I'll do that. :-)

To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >