Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 1
    +1 But this will run also on reboot, which could be annoying / unwanted. I had to set some guards in place to make the trick work only on shutdown. See here. There might be a cleaner way to do it instead of grepping stuff, however I never looked into that after getting that thing to work. So if someone knows of a better way I'd be very happy to hear about it Commented Aug 9, 2024 at 21:27
  • @kos I still have these 200 rep bounty that I need to assign to some answer that someone else wrote – if you could write your own, that'd actually be helpful, otherwise that investment would just go to waste… Commented Aug 9, 2024 at 21:30
  • I quickly edited my answer from Ask Ubuntu to make it relevant for this specific case, if you want to award the bounty I'll make sure to rebounty the question if Tom Yan happens to answer, and award the bounty to them, as technically they came in first. Could you please test my answer though? It's untested, I had to put it toghether quickly because of the bounty expiring shortly. Commented Aug 9, 2024 at 21:49
  • Also I'll make sure to fix that, but you said you don't want the service to run on every shutdown, so I'll have to convert the service to a systemd-run command, please confirm that's the case and I'll get back to that tomorrow Commented Aug 9, 2024 at 21:49
  • 1
    Done, I've tested both the systemd-run command and the service I'm proposing in the answer, they both work flawlessly, although I've tested them using a sleep command and not using an update command (it shouldn't matter as long as they're latched to the "right" target, I've done that mainly because I wanted to see the thing stuck in plymouth). Also you were right about the --now option, there was no reason to avoid it, so I included it into the answer. Let me know if that works for you Commented Aug 10, 2024 at 9:09