Re: Automatic start of systemd units after installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 5, 2017 at 8:27 AM, Stephen Gallagher <sgallagh@xxxxxxxxxx> wrote:
> On 04/05/2017 06:04 AM, Simon Fels wrote:
>> Hey everyone,
>>
>> there is a systemd .socket unit in of the packages I maintain. It
>> already has a preset in the default preset configuration so it is
>> properly enabled after the package got installed.
>>
>> However what I am wondering about is, if it is expected that I need to
>> reboot the system or manually call
>>
>> $ systemctl start my.socket
>>
>> to get the unit properly started. After a system reboot the socket unit
>> is started as it should.
>>
>> I've tried to find any policy which tells me what is allowed here and
>> what not but only found
>> https://fedoraproject.org/wiki/Packaging:DefaultServices which isn't
>> clear on this topic.
>>
>
>
> Yeah, we should probably amend this document. systemd doesn't automatically
> start the installed services even if the preset is available because it has to
> account for the case where the package is being installed in the installer (e.g.
> Anaconda, Calamares, etc.) environment where it's actually happening in a chroot
> or other similar approach.
>
> We don't have that information when the RPM scripts run, so we can't
> conditionalize it.
>

systemctl ignores commands to start services when it is in a chroot.
It even prints out a message saying as much.

We have at least one package I know of that actually does start
services automatically (lvm2), and it does the "ignoring because in
chroot" thing as it should.

If we had a %systemd_post_start that checked to see if each service
was enabled (after preset run), it could then run start on services
that are preset to be enabled only.

-- 
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux