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

Return codes in case of update or not... #157

Open
mbocquet opened this issue Jan 4, 2015 · 6 comments
Open

Return codes in case of update or not... #157

mbocquet opened this issue Jan 4, 2015 · 6 comments

Comments

@mbocquet
Copy link

mbocquet commented Jan 4, 2015

At this time, rpi-update returns 0 if a new firmware has been successfully installed... and also 0 if no firmware update is needed.
Returning a different code should be better to check if we need to reboot or not in case rpi-update is launched by cron.

For example, with the current version, the following command :

rpi-update && reboot

reboots the pi even if no firmware wasn't updated.

I know that this can be handled by testing the output for the string "reboot required"... But a return code is better than checking for a specific string which can be subject to change ?

@popcornmix
Copy link
Collaborator

Can you use JUST_CHECK from here?

@mbocquet
Copy link
Author

mbocquet commented Jan 4, 2015

I will ! But do you plan to use return codes in the future?

@thib3113
Copy link

i think to is a good idea, it's easier and faster to look at a number rather than a big sentence with lot of commits etc. Or you can make a no-verbose mode

@mbocquet
Copy link
Author

mbocquet commented Feb 7, 2015

Here is a wrapper script for my needs...
rnrpi-update

@Ruffio
Copy link

Ruffio commented Apr 30, 2016

@popcornmix is something like this going to be implemented or should this issue be closed as wont fix?

@Ruffio
Copy link

Ruffio commented May 20, 2016

@popcornmix any thoughts?

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

4 participants