Bug 626966 - error in daemon(7)
Summary: error in daemon(7)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-24 18:45 UTC by Bill Nottingham
Modified: 2014-03-17 03:24 UTC (History)
6 users (show)

Fixed In Version: initscripts-9.20-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-14 23:29:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2010-08-24 18:45:53 UTC
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

Comment 1 Lennart Poettering 2010-09-06 00:29:47 UTC
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?

Comment 2 Bill Nottingham 2010-09-07 17:07:12 UTC
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?

Comment 3 Lennart Poettering 2010-09-12 19:16:50 UTC
But wouldn't this then also run on the uninstall of the last version? There we definitely don't want to call "systemctl enable"?

Comment 4 Bill Nottingham 2010-09-13 18:08:18 UTC
No, because the trigger is contained in the new version of the package. It will never fire when the new version is uninstalled.

Comment 5 Lennart Poettering 2010-09-13 18:53:22 UTC
OK, fixed the man page now upstream.

Comment 6 Fedora Update System 2010-09-14 01:04:26 UTC
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

Comment 7 Fedora Update System 2010-09-14 04:28:12 UTC
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

Comment 8 Fedora Update System 2010-09-15 07:11:49 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.