17
submitted 5 months ago* (last edited 5 months ago) by boredsquirrel@slrpnk.net to c/kde@lemmy.kde.social
you are viewing a single comment's thread
view the rest of the comments
[-] e_t_@kbin.pithyphrase.net 2 points 5 months ago

I really don't understand dbus.

I think systemd targets work opposite to your expectation. The Wants in [unit] define the things that that unit needs to already be available. For instance, you might add Wants=network.target to the unit for nginx so that it won't try to start until the network is available. When I wrote a unit to start my company's application, I also had Wants=postgresql.service to ensure that the database came up before the application. Remember that sysyemd tries to run as many things in parallel as it can. This is one thing that makes it much faster than classic sysvinit which started things sequentially. But it means race conditions can occur. You use Wants to break those races where necessary. The targets that you'd specify in WantedBy in [install] more closely resemble SysV runlevels. You might want to read how runlevels used to work in SysV, in order to understand systemd targets.

[-] boredsquirrel@slrpnk.net 1 points 5 months ago

I fixed them and edited the post. There now is a Github repo for the script, and guess what? Most services still run, so there are at least 2 mechanisms to start them. What a mess

[-] boredsquirrel@slrpnk.net 1 points 5 months ago

Something ChatGPT gave me

Requires vs Wants:

  • Requires: If a unit "requires" another unit, it means that the former cannot function properly without the latter being active. If the required unit fails, the dependent unit will also fail.
  • Wants: As mentioned earlier, "wants" implies a weaker dependency. If a unit wants another unit, it will start if the wanted unit is activated, but it won't fail if the wanted unit fails.

Sounds like most of the services actually have Requires and not Wants.

So Wants is more used to indicate in what "wave" a service should run. Quite nice!

this post was submitted on 10 May 2024
17 points (87.0% liked)

KDE

5207 readers
58 users here now

KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.

Plasma 6 Bugs

If you encounter a bug, proceed to https://bugs.kde.org, check whether it has been reported.

If it hasn't, report it yourself.

PLEASE THINK CAREFULLY BEFORE POSTING HERE.

Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.

founded 1 year ago
MODERATORS