# How does EndeavourOS do the reboot check after update?

**URL:** <https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364>\
**Category:** EndeavourOS repo\
**Created:** [November 25, 2021, 2:15pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364 "2021-11-25T14:15:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JKMooney](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/jkmooney/32/44028_2.png) [@JKMooney](https://forum.endeavouros.com/u/JKMooney)\
**Post date:** [November 25, 2021, 2:15pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/1 "2021-11-25T14:15:22Z")

</div>

I run EndeavourOS on this machine and vanilla Arch on another. One thing I like to do is implement features I like on EndeavourOS on my Arch machine. While there is a simple reboot-checker script in the AUR, I’m finding that it always suggests a reboot because I have both the Linux and Linux-LTS kernels installed. Maybe I can fix the script, but whatever EndeavourOS is doing doesn’t seem to have that issue. Also, I’m having a hard time finding out how the script is called as part of an update.

Is there any documentation that explains how it works?

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [November 25, 2021, 2:42pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/2 "2021-11-25T14:42:24Z")

</div>

It is implemented in package `eos-hooks`, in these files:

- eos-reboot-required.hook
- eos-reboot-required2
- eos-reboot-required

`eos-reboot-required.hook` is a pacman hook that calls eos-reboot-required2 when a listed package will be updated.

`eos-reboot-required2` has the logic to check if a reboot is _really_ recommended.

`eos-reboot-required` displays the actual notification.

---

<div class="post-metadata">

**Author:** ![s4ndm4n](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/s4ndm4n/32/70472_2.png) [@s4ndm4n](https://forum.endeavouros.com/u/s4ndm4n)\
**Post date:** [November 25, 2021, 2:45pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/3 "2021-11-25T14:45:22Z")

</div>

Install eos on the other machine as well. Problem solved 🤣.

---

<div class="post-metadata">

**Author:** ![JKMooney](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/jkmooney/32/44028_2.png) [@JKMooney](https://forum.endeavouros.com/u/JKMooney)\
**Post date:** [November 25, 2021, 2:55pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/4 "2021-11-25T14:55:13Z")

</div>

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![JKMooney](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/jkmooney/32/44028_2.png) [@JKMooney](https://forum.endeavouros.com/u/JKMooney)\
**Post date:** [November 25, 2021, 3:43pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/5 "2021-11-25T15:43:12Z")

</div>

Ok, found them…and went through the ArchWiki on how pacman hooks work. What you have is a lot better than that little script I found in the AUR. Looks like eos-reboot-required2 is also checking to see if the update was on the currently running kernel.

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [November 25, 2021, 3:44pm UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/6 "2021-11-25T15:44:33Z")

</div>

Yeah, it makes some checks to see if a reboot would be needed. Running kernel is one of those checks.

---

<div class="post-metadata">

**Author:** ![Kresimir](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/kresimir/32/73739_2.png) [@Kresimir](https://forum.endeavouros.com/u/Kresimir)\
**Post date:** [November 26, 2021, 12:10am UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/7 "2021-11-26T00:10:07Z")

</div>

Consider this little script I wrote:

> [@Check if a reboot is neccessary](https://forum.endeavouros.com/t/check-if-a-reboot-is-neccessary/7092/37):
>
> So it’s basically just a list of packages that need reboot after an update? Well, that’s a bit disappointing. But it makes it easy to check in a script. This script will tell you whether reboot is necessary, with approximately the same accuracy as eos-update-notifier: #!/bin/bash # Check whether reboot is necessary after an update. # dependency: checkupdates UPDATES=$(checkupdates) # assume packages containing these strings in name need reboot after updating REBOOT="(ucode|cryptsetup|linux|nvi…

---

<div class="post-metadata">

**Author:** ![JKMooney](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/jkmooney/32/44028_2.png) [@JKMooney](https://forum.endeavouros.com/u/JKMooney)\
**Post date:** [November 26, 2021, 1:25am UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/8 "2021-11-26T01:25:12Z")

</div>

Nice thing about Linux systems is that you can write up that little script and give it a shot 😉

---

<div class="post-metadata">

**Author:** ![JKMooney](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/jkmooney/32/44028_2.png) [@JKMooney](https://forum.endeavouros.com/u/JKMooney)\
**Post date:** [November 30, 2021, 12:59am UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/9 "2021-11-30T00:59:57Z")

</div>

Reading up a little on pacman in the ArchWiki, I think I understand why Arch does not already have a “recommend reboot” utility. It seems those devs are quite conservative and suggest rebooting after every “pacman -Syu”. I think that may be a little over-conservative but, I’ll acknowledge I’m not the expert here 😉

---

<div class="post-metadata">

**Author:** ![anon63071375](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f0a364/32.png) [@anon63071375](https://forum.endeavouros.com/u/anon63071375)\
**Post date:** [November 30, 2021, 1:44am UTC](https://forum.endeavouros.com/t/how-does-endeavouros-do-the-reboot-check-after-update/20364/10 "2021-11-30T01:44:28Z")

</div>

I would just assume anything with mesa or kernel related requires reboot. I only update like weekly ish anyway, so I just reboot just every time.
