[opensuse-packaging] keep services enabled during upgrade
What is the best way to keep an already enabled sysv runlevel script enabled when the package moves from sysv init scripts to .service files? To me it looks like having the service file listed in the preset-branding files is not enough when doing rpm -Fvh X.rpm. The result is a disabled service if the previous version of X.rpm had an active /etc/init.d/X and the current version has a X.service. I'm forced to run 'systemctrl start X.service' after every reboot. Would at least a "zypper dup" allow that because it sets YAST_IS_RUNNING? Olaf -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, Dec 18, 2013 at 01:37:46PM +0100, Olaf Hering wrote:
What is the best way to keep an already enabled sysv runlevel script enabled when the package moves from sysv init scripts to .service files? To me it looks like having the service file listed in the preset-branding files is not enough when doing rpm -Fvh X.rpm. The result is a disabled service if the previous version of X.rpm had an active /etc/init.d/X and the current version has a X.service. I'm forced to run 'systemctrl start X.service' after every reboot.
Would at least a "zypper dup" allow that because it sets YAST_IS_RUNNING?
If the name of the init script and the service are the same, the %service* macros do that themselves. systemctl enable X.service to make it default enabled. Ciao, Marcus -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, Dec 18, Marcus Meissner wrote:
If the name of the init script and the service are the same, the %service* macros do that themselves.
It turned out there was a stale entry in /var/lib/systemd/migrated/ from earlier, incomplete attempts. Once I removed the file the suggested macros work ok. Olaf -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Le mercredi 18 décembre 2013 à 13:37 +0100, Olaf Hering a écrit :
What is the best way to keep an already enabled sysv runlevel script enabled when the package moves from sysv init scripts to .service files?
It is done automatically if the package is using the various % service_add|del_pre|post macros.
To me it looks like having the service file listed in the preset-branding files is not enough when doing rpm -Fvh X.rpm. The result is a disabled service if the previous version of X.rpm had an active /etc/init.d/X and the current version has a X.service. I'm forced to run 'systemctrl start X.service' after every reboot.
presets are only applied for initial package install, not on upgrade (including sysv => systemd upgrade). -- Frederic Crozat <fcrozat@suse.com> SUSE -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Frederic Crozat
-
Marcus Meissner
-
Olaf Hering