summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-03-20 11:13:15 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-03-20 11:13:15 +0000
commita8ea4cbcc8337e0fd4d423201794891fdf6e8677 (patch)
tree25e7ca2526b5d89b6883ec407898ec3c7045cff0 /scripts
parent8ab229ddf2383ec6455836f342539b8c89356f76 (diff)
downloadguix-a8ea4cbcc8337e0fd4d423201794891fdf6e8677.tar.gz
* 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.

Diffstat (limited to 'scripts')
-rw-r--r--scripts/find-runtime-roots.pl.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/find-runtime-roots.pl.in b/scripts/find-runtime-roots.pl.in
index 11c96e8b23..64c17419ff 100644
--- a/scripts/find-runtime-roots.pl.in
+++ b/scripts/find-runtime-roots.pl.in
@@ -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";