#874 PR merged: Typo in install_yaboot.sh with sfdisk command (2>&8 instead of 2>&1) ????

Labels: enhancement

schabrolles opened issue at 2016-06-11 13:07:

I'm not sure, but it looks like a typo. Could you check and confirm ?

schabrolles commented at 2016-06-12 10:14:

After looking at other rear shell, I've seen other references to file descriptor 8 and 7. So I think it is not a typo .... but I prefer asking you for confirmation.
Could you tell me why we are using those fd ?
thanks.

gdha commented at 2016-06-13 06:40:

@schabrolles in conf/default.conf you will find some info:

# NOTE: This command will be run within the ProgressBar system !! You should therefore avoid
# output on STDOUT by rerouting that to FD 8, the progress bar
EXTERNAL_CHECK="ssh vms date >&8"

The use of the progress bar is however not used anymore these days.

gdha commented at 2016-06-20 12:21:

@schlomo What shall we do with the progress bar thingy?

schlomo commented at 2016-06-20 13:03:

If we don't use the progress bar any more then we should also remove all references to FD8, e.g. >&8. The progress bar mechanism would swallow all data.

jsmeix commented at 2016-06-21 07:32:

There is currently the generic question whereto
stdout and stderr output should go, see https://github.com/rear/rear/issues/885

In particular see https://github.com/rear/rear/issues/885#issuecomment-226784037 (excerpt):

the mkfs commands do not have >&2 appended (I guess that was done on purpose so that the user see something on the screen).

Therefore there is also the question here if the sfdisk output
should tray on stderr or if it should be redirected to stdout
"on purpose so that the user see something on the screen"?

Regardless of that question we do no longer use FD8
so that either "2>&1" or nothing is correct nowadays.

@schabrolles
by the way:
Preferably use $( COMMAND ) instead of backticks,
see https://github.com/rear/rear/wiki/Coding-Style

schabrolles commented at 2016-06-22 12:32:

@jsmeix
I'm not the original author and also noticed that ... I can add this change to also remove backticks.


[Export of Github issue for rear/rear.]