sysdump: rework ignore list code and ignore further files
authorMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 15:13:25 +0000 (16:13 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:35:25 +0000 (17:35 +0100)
commit3d53667bbd60379625f120ed3b90a5097f1cb248
tree6b0425b027fdbc3677d3d36c9eada6f22c1b9eef
parentaba8e139aa77d94870b600bf9f1aefc0112bf3b3
sysdump: rework ignore list code and ignore further files

When getting towards /sys/kernel/tracing, the script is known to hang
at least at the following files:

* /sys/kernel/tracing/trace_pipe
* /sys/kernel/tracing/per_cpu/cpu[0-9]+/trace_pipe
* /sys/kernel/tracing/per_cpu/cpu[0-9]+/trace_pipe_raw
* /sys/kernel/tracing/per_cpu/cpu[0-9]+/snapshot_raw

So we need to extend the list of files to be ignored.

While at it, rework the checks and ignore a bunch of further files, that
can't be read, e.g. due to "Permission denied".

FTR, we sadly can't ignore "/sys/.*/uevent" files globally, as
there are a bunch of files that contain and also provide actual data.

Thanks: Darshaka Patirana for tracking down the /sys/kernel/tracing/* issue
Closes: grml/grml-hwinfo#3
sysdump