mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 23:02:27 +00:00
* 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
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user