* Stanislav Brabec <sbrabec@suse.cz> [2014-11-21 16:24]:
Guido Berhoerster wrote:
I'm happy to fix it if someone tells me how that should be handled, https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines says nothing about it. IMO former boot.* scripts should always be enabled by default, hence my question above.
There are two tips how to handle special cases:
Preset introduced later than the service, and you need one time preset:
%pre ... if [ $1 -gt 1 ] ; then if ! {test if preset exists in file or branding file} ; then echo -n "" >/run/rpm-%{name}-update-{service name}-new-in-upgrade fi fi
(Exact look of the check depends on the result of this discussion. If there will be decision to move all presets to the branding file, script should be modified.) Used in: util-linux/uuidd, pcsc-lite/pcscd
Keeping service state during migration from sysv style init scripts:
%pre if /usr/bin/chkconfig {initscript} 2>&1 | grep -q on; then touch /run/enable_{service}_service fi %service_add_pre {service}.service
%post %service_add_post {service}.service if [ -f /run/enable_{service}_service ]; then /usr/bin/systemctl --quiet enable {service} rm /run/enable_{service}_service fi
Used in: openldap2
Thanks, the latter looks like a suitable workaround until systemd-sysv-convert is fixed. -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org