User talk:YHNdnzj

From ArchWiki

'Generic service template' deletion in Power management/Suspend and hibernate

Hi, this is about this edit which removed an entire section with the reason of "writing a systemd unit to invoke systemctl makes no sense".

Generally speaking, if something has been added to the wiki, it is often because it fulfilled a function. In this case, it illustrated how to use a single sleep hook template unit to then include any desired service, instead of writing custom hooks for each and every service as is currently the case.

The example invoking systemctl might not make sense to you, and I'd like to ask why and what you suggest instead, but this does not warrant the deletion of an entire section. This is plain and simple information loss, and we should not be too cavalier about removing information that users added (when it is not blatantly wrong). Neitsab (talk) 19:28, 22 June 2024 (UTC)Reply

Well, the way I think how a Wiki (as opposed to a Guide) should work is that we should have one example per case, rather than bloating the page with a bunch of sufficiently similar ones. In this case, Power management/Suspend and hibernate#Combined sleep/resume_unit covers the use case, and people can just plug in systemctl start/stop there. I don't think any information is lost.
Plus, it's completely unnecessary to implement stuff like this. systemd has a powerful job engine, and what you're trying to do can be trivially implemented through Conflicts= and OnSuccess= directives. Roundtrips through systemctl makes little to no sense. Actually, some users tried to add an example involving the said dep[1], but it got reverted for the reason I mentioned earlier - we don't need "duplicated" examples. This is a wiki, and you're supposed to navigate through pages to find what you need, instead of having everything squeezed into a single page.
-- YHNdnzj (talk) 19:54, 22 June 2024 (UTC)Reply