#1365 PR merged: Do not discard stderr needlessly (related to pull request 1359).

Labels: enhancement, cleanup, fixed / solved / done

jsmeix opened issue at 2017-05-15 13:57:

In 400_copy_modules.sh all redirections of stderr to /dev/null
were removed (only some '1>/dev/null' are left), cf.
https://github.com/rear/rear/pull/1359#discussion_r116239195
Furthermore duplicate module files in the 'modprobe --show-depends'
output are now removed only to avoid useless stderr warnings
from the subsequent 'cp' command like
"cp: warning: source file '/lib/modules/.../foo.ko' specified more than once"
regardless that nothing goes wrong when 'cp' gets duplicate source files
cf. http://blog.schlomo.schapiro.org/2015/04/warning-is-waste-of-my-time.html

jsmeix commented at 2017-05-15 14:02:

Regarding
https://github.com/rear/rear/pull/1359#issuecomment-301071974
there is now also a small (perhaps even sufficient?) improvement:
Now all error messages appear in the log so that for things like
MODULES=( "${MODULES[@]}" 'qqqq' )
the non-existent module 'qqqq' is at least reported in the log:

+ source /root/rear/usr/share/rear/build/GNU/Linux/420_copy_firmware_files.sh
...
++ for module in '"${MODULES[@]}"'
++ module=qqqq
++ module=qqqq
++ modinfo qqqq
modinfo: ERROR: Module qqqq not found.
++ continue

[Export of Github issue for rear/rear.]