Re: [HEADS-UP] systemd for F14 - the next steps

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

 



On Fri, Jul 23, 2010 at 01:25:23AM +0200, Lennart Poettering wrote:
> On Thu, 22.07.10 17:51, Horst H. von Brand (vonbrand@xxxxxxxxxxxx) wrote:
> 
> > > Kay and I have discussed this now. We agreed to fold systemd-install
> > > into systemctl entirely, and replace --realize by --now. Also, we'll
> > > drop some of the options --realize had, and always imply that the init
> > > system configuration shall be reloaded after all changes took
> > > place. This basically means that this
> > > is what will be done in %post in the general case:
> > > 
> > > if [ $1 -eq 1 ] ; then
> > >      systemctl enable foo.service
> > > else
> > >      systemctl daemon-reload
> > 
> > Huh? One you have to tell about the affected service, the other not?
> 
> Yes, because we reload init system configuration globally, not
> partially. This otherwise creates all kind of messes with problems where
> configuration changes might be half loaded and half not loaded.
> 
> And the enable command already implicitly reloads the init system config
> to make sure the symlinks created are taken into account by the init
> system. When we upgrade packages we don't change anything howevber, and
> hence do only the init system reload.
> 
Do you really mean this, then? ::

%post
if [ $1 -gt 1 ] ; then
    systemctl enable foo.service
elif [ $1 -eq 1 ] ; then
    systemctl daemon-reload
fi

(in %post and %pre, there are two packages installed when doing an upgrade.
Thus, the value of $1 will be 2 for an upgrade and 1 for an install).

-Toshio

Attachment: pgphfkInGxudY.pgp
Description: PGP signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[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