Description of problem: To facilitate upgrades from a package version that shipped only SysV init scripts to a package version that ships both a SysV init script and a native systemd service file, use a fragment like the following: %triggerin -- foobar < 0.47.11-1 if /sbin/chkconfig foobar ; then /bin/systemctl enable foobar.service foobar.socket >/dev/null 2>&1 || : fi Where 0.47.11-1 is the first package version that includes the native unit file. This fragment will ensure that the first time the unit file is installed it will be enabled if and only if the SysV init script is enabled, thus making sure that the enable status is not changed. That should be %triggerun, not %triggerin. Version-Release number of selected component (if applicable): systemd-7-3
So, Kay and I have now tried to wrap our heads around this, but we are more confused than before. If we change this to %triggerun, wouldn't we also have to check $1?
If it's triggerun, you're running on the uninstall of that previous version. So you already know that you're removing it. Perhaps I'm confused about where you're confused?
But wouldn't this then also run on the uninstall of the last version? There we definitely don't want to call "systemctl enable"?
No, because the trigger is contained in the new version of the package. It will never fire when the new version is uninstalled.
OK, fixed the man page now upstream.
systemd-10-1.fc14,initscripts-9.20-1.fc14,sysvinit-2.87-5.dsf.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/systemd-10-1.fc14,initscripts-9.20-1.fc14,sysvinit-2.87-5.dsf.fc14
systemd-10-1.fc14, initscripts-9.20-1.fc14, sysvinit-2.87-5.dsf.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update systemd initscripts sysvinit'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/systemd-10-1.fc14,initscripts-9.20-1.fc14,sysvinit-2.87-5.dsf.fc14
initscripts-9.20-1.fc14, sysvinit-2.87-5.dsf.fc14, systemd-10-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.