[systemd-devel] EXT :Re: systemctl start second.service first.service

Mantas Mikulėnas grawity at gmail.com
Mon Jan 15 14:19:02 UTC 2018


On Mon, Jan 15, 2018 at 3:39 PM, Boyce, Kevin P [US] (AS) <
Kevin.Boyce at ngc.com> wrote:

> > you can't Require mysql because it's wrong when postgresql is used you
> can't Require postgresql because it's wrong when mysql is used
>
> Why wouldn't the mysql/postgres/mariadb packager have a section as follows:
> [Install]
> Alias=database.service
>
> Then you could have other services reference the dependency on
> database.service.  I think this would work much like the
> display-manager.service.  Not everyone uses gdm, some use lightdm, kdm,
> etc.  I expect it work work the same way.
>

No, they're different.

Display managers are exclusive – there's usually only one per system. But
the same system could easily run several different databases at once –
MySQL, Postgres, Firebird do not conflict with each other. So an alias
would prohibit that.

If a program has selectable database backends, I would say it's up to the
sysadmin to define dependencies as well. `systemctl add-requires
my-app.service mysql.service` would do the job. Or the app could ship a
"generator" (similar to the existing fstab-generator, nfs-generator,
openvpn-generator...) which adds those dependencies dynamically.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180115/e99ccb22/attachment.html>


More information about the systemd-devel mailing list