summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rw-r--r--hooks/memdisk11
1 files changed, 11 insertions, 0 deletions
diff --git a/hooks/memdisk b/hooks/memdisk
new file mode 100644
index 0000000..2c3642e
--- /dev/null
+++ b/hooks/memdisk
@@ -0,0 +1,11 @@
+# vim:set ft=sh:
+run_hook ()
+{
+ MEMDISK=$(/usr/bin/memdiskfind)
+ if [ $? -eq 0 ]; then
+ # We found a memdisk, set up phram
+ /sbin/modprobe phram phram=memdisk,${MEMDISK}
+ # Load mtdblock, the memdisk will be /dev/mtdblock0
+ /sbin/modprobe mtdblock
+ fi
+}