X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=sysdump;h=e83738b4cf6cbd80a978b102675a0f533ede066d;hb=2a46773d300c03855b713abd9bde350ef2a48194;hp=17c2b9fbce785a3db4730824b3539d4cbe178c78;hpb=2ffc71217b46c8995985f852d6c62fdb92a6bf79;p=grml-hwinfo.git diff --git a/sysdump b/sysdump index 17c2b9f..e83738b 100755 --- a/sysdump +++ b/sysdump @@ -62,7 +62,19 @@ sub dump_value($$) my $level = shift; my $file = shift; - open (FILE, "<$file") || print "can't open $file: $!"; + if ($file =~ "/sys/kernel/debug/.*") { + print("ignoring file $file\n"); + return 0; + } + if ($file =~ "/sys/kernel/security/apparmor/revision") { + print("ignoring file $file\n"); + return 0; + } + + if (!open (FILE, "<$file")) { + print STDERR "can't open $file: '$!'\n"; + return 0; + } my $value; { local $/;