* Scan /proc/sys/kernel/modprobe for roots to prevent the kernel

modules for the running kernel from being garbage-collected.  Idem
  for /proc/sys/kernel/fbsplash.
This commit is contained in:
Eelco Dolstra 2007-03-20 11:13:15 +00:00
parent 8ab229ddf2
commit a8ea4cbcc8
1 changed files with 17 additions and 0 deletions

View File

@ -56,3 +56,20 @@ sub lsof {
readProc;
lsof;
sub readFile {
my $path = shift;
if (-e $path) {
if (open FILE, "$path") {
while (<FILE>) {
print;
}
close FILE;
}
}
}
# This is rather NixOS-specific, so it probably shouldn't be here.
readFile "/proc/sys/kernel/modprobe";
readFile "/proc/sys/kernel/fbsplash";