* 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:
parent
8ab229ddf2
commit
a8ea4cbcc8
1 changed files with 17 additions and 0 deletions
|
@ -56,3 +56,20 @@ sub lsof {
|
||||||
|
|
||||||
readProc;
|
readProc;
|
||||||
lsof;
|
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";
|
||||||
|
|
Loading…
Reference in a new issue