Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] When rpi-update invoked from CLI, /var/run/reboot-required is not set? Can it be? #274

Open
dachshund-digital opened this issue Feb 15, 2019 · 7 comments

Comments

@dachshund-digital
Copy link

It would seem like a good idea to set /var/run/reboot-required if a reboot is required, no? This would mirror the logic apt-get establishes.

@popcornmix
Copy link
Collaborator

Does this file have any effect on a default install of raspbian?
i.e. does it get automatically displayed somewhere?

@J0WI
Copy link

J0WI commented Apr 24, 2019

It's used by various monitoring tools

@dachshund-digital
Copy link
Author

dachshund-digital commented Apr 25, 2019

I understand why it is set when set, the question is... should it be set when rpi-update runs... IMHO it should be set when a firmware update is actually done. Right now it is not set, so other than a text message on screen warning that the firmware requires a reboot, no notification is set. This is rather bad form. Monitoring tools can't tell if firmware is active or not because the standard notification method is not used, it is considered a standard for reboot notification, based on all the documentation I have reviewed thus far. So who or whom maintains rpi-update, please add this to the feature list.

@popcornmix
Copy link
Collaborator

It's used by various monitoring tools

More specifics would be useful.

rpi-update is designed for raspbian users. What affect does this file have on the standard preinstalled packages? What packages that are optionally installed does it have an effect on?

Now on Ubuntu, if I ssh in I see the contents of /var/run/reboot-required echoed back.
But on raspbian that doesn't occur.

@lurch
Copy link
Contributor

lurch commented Jun 8, 2019

Closely related to #263 ?

@dachshund-digital
Copy link
Author

dachshund-digital commented Jun 8, 2019

Close? No. Very different based on how I read 263. To which, 263 is asking for a way to have rpi-update invoke reboot automatically if the option is provided. What I am asking for is notification based, rpi-update provide proper notification a reboot is requried... not that rpi-update actually do the reboot its self.

Moreover, I found more details on what files should be created by rpi-update and what they should contain. The /var/run/reboot-required should be required when reboot is required, and it should just be a non-empty file, typically it has one line of text that reads "This system requires a reboot" or something to that effect. The /var/run/reboot-required.pkgs file should be created and its content I have explained below.

I would say they are similar, but now different given the additional information I found on this subject. The original issue I pointed out was that rpi-update does not follow the standard method for reboot required notification, and it really should. But there are actually two files that should be enerated:

  1. /var/run/reboot-required... if the file exists at the given path, a reboot should be done. Many monitoring solutions leverage the existence of this file, as a notification or warning trigger. Node-Red, various monitoring tools, etc. leverage this.

  2. /var/run/reboot-required.pkgs... if a file that is created and lists the packages installed, that require a reboot. So when rpi-update runs, and a reboot is required, not only is /var/run/reboot-required file created, but the /var/run/reboot-required.pkgs file is created, if it does not exist, and "rpi-update" should be in the file. If the file does exist already, than "rpi-update" should be appended at the end of file.

Clearly the first file is a trigger notification file. The second file provides detail on why the first exists. Most Linux distributions, including debian variants rely on these files as noted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants