On Mon, Jan 15, 2018 at 3:39 PM, Boyce, Kevin P [US] (AS) <
kevin.bo...@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
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to