Any Hook Ideas?

After lots of threads and discussions about the Grub issue and how to overcome it, for example at Grub Updated Seamlessly and Grub Hook to grub-install and grub-mkconfig?

and after what I learned from these discussions that it is better to do it through a hook not a script.

So, after actually doing a hook, it is really interesting to have a hook to automate something under a certain condition. I am trying to explore other possible hooks that can be made to make our system even better.

I am posting this to exchange ideas about what hooks can be made?

I just thought of something to start with, a hook to watch memory and if used memory is above a certain limit the hook runs a command to free up memory so your machine will never hang because of memory shortage.

Any other ideas to make our EndeavourOS even better?

While not a hook, there’s systemd-oomd.service, which does pretty much what you’re describing.

Might be worth looking into how it works if you find automation interesting.

1 Like

Thank you very much @LewdLoli
I will read the link and see.
I am trying to like brainstorm and find out some good ideas as I like the concept of hooks.

1 Like

Pacman hooks are run during package management operations, hooks aren’t daemons.
To actually answer your question, I masked update-mandb.timer (or something like that) on my old PC and made a pacman hook which did the job of the service the timer triggered. That timer triggered on first boot of every day and significantly slowed down boot process (I had a HDD back then) so I moved the functionality to a pacman hook.

1 Like

It was the existence of a hook that caused all this GRUB mess in the first place. If anything else, it’s a good reminder that updates on Arch shouldn’t be automated.

In general, I prefer to have as few hooks, soystemd services, timers, cronjobs, etc, as possible.


You have confused pacman hooks with systemd units.

Do some reading on both at Archwiki. It’s liberating :rofl:

I suggest to write a hook to stop all hooks from running. :innocent:

I am also not a big fan of additional things running automatically in the background.

Case dismissed
Thank you

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.