From a.badger at gmail.com Thu Jun 4 18:53:11 2015 Content-Type: multipart/mixed; boundary="===============7502384187599304682==" MIME-Version: 1.0 From: Toshio Kuratomi To: devel at lists.fedoraproject.org Subject: Re: [HEADS-UP] systemd for F14 - the next steps Date: Thu, 22 Jul 2010 19:41:34 -0400 Message-ID: <20100722234134.GD27474@unaka.lan> In-Reply-To: 20100722013041.GA17195@tango.0pointer.de --===============7502384187599304682== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Jul 22, 2010 at 03:30:42AM +0200, Lennart Poettering wrote: > On Wed, 21.07.10 20:08, Toshio Kuratomi (a.badger(a)gmail.com) wrote: > = > > > - If you want to enable and possibly start a service from the %post of > > > an RPM then use the "systemd-install enable" command, which will > > > create a few symlinks as listed in the [Install] section of the unit > > > file. On top of that you may also pass --realize=3D... to the comma= nd, > > > which allows you to not only enable the unit for the next boot, but > > > also have the changes take effect immediately: i.e. --realize=3Drel= oad > > > is the very least you should use, which simply makes systemd aware = of > > > the changed symlinks. Then, at time of %preun you should use > > > --realize=3Dyes which makes sure the daemon is stopped in > > > deinstallation. For a few daemons it makes sense to restart them if > > > they are running already during upgrade. Use --realize=3Dminimal for > > > those. For even others (usually very low-level ones) it might even > > > make sense to start them right-away after installation, even if they > > > were not running before. For those use --realize=3Dmaybe. But which > > > option you use really depends on the package. Most packages > > > should probably stick to --realize=3Dyes on %preun and --realize=3D= reload > > > in %post. Suggested .spec file fragments you find in the daemon(7) = man > > > page. > > > = > > Normally, we don't want a service to be started just because the packag= e has > > been installed: > > = > = > Yepp, which is why I said "very low-level ones", i.e. as low-level as > for example udev, which you really want to be running. > = > > https://fedoraproject.org/wiki/Packaging/SysVInitScript. > > = > > This is the current recommended scriptlets: > > = > > %post > > # This adds the proper /etc/rc*.d links for the script > > /sbin/chkconfig --add