Skip to content

Sysupgrade output redirection into the system logs

Ghost User requested to merge ovil/sysupgrade-syslog into devel

This change redirects all (at least, so far) stdout/stderr output into the system logs with the tag 'sysupgrade', instead of the serial console which catches stderr output. Some light modifications were needed for that to happen in the log() function in iopsys.sh.

Things I'm not sure of:

  • It seems there is a default level of VERBOSEity, set to 1. sysupgrade -q seems to decrement this, sysupgrade -v increments this. I'm not sure setting VERBOSE to 0 is the way to go here, at the same time we'd need to modify other parts of the code not to output to stderr when VERBOSE is set. The log() function in iopsys.sh outputs to stderr if VERBOSE is set to >=1. One solution can be to make log() output to stderr on VERBOSE>1, stdout (or only log) on VERBOSE=1 and only log on VERBOSE=0

  • Temporary output redirection into a file. It does not seem natural, but it seems to be a better way than storing the whole output into a variable.

Things not redirected: There's a stream of dots still being done, I think, by bcm_flasher. But I did manage to get the majority of the dots to the system logs :-)

Edited by Ghost User

Merge request reports