Sysupgrade output redirection into the system logs
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
VERBOSE
ity, set to 1.sysupgrade -q
seems to decrement this,sysupgrade -v
increments this. I'm not sure settingVERBOSE
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 whenVERBOSE
is set. Thelog()
function in iopsys.sh outputs to stderr ifVERBOSE
is set to >=1. One solution can be to makelog()
output to stderr onVERBOSE
>1, stdout (or only log) onVERBOSE=1
and only log onVERBOSE=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 :-)