rpi-update icon indicating copy to clipboard operation
rpi-update copied to clipboard

Return codes in case of update or not...

Open mbocquet opened this issue 10 years ago • 6 comments

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 ?

mbocquet avatar Jan 04 '15 15:01 mbocquet

Can you use JUST_CHECK from here?

popcornmix avatar Jan 04 '15 15:01 popcornmix

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

mbocquet avatar Jan 04 '15 16:01 mbocquet

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

thib3113 avatar Jan 16 '15 06:01 thib3113

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

mbocquet avatar Feb 07 '15 13:02 mbocquet

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

Ruffio avatar Apr 30 '16 06:04 Ruffio

@popcornmix any thoughts?

Ruffio avatar May 20 '16 06:05 Ruffio