summaryrefslogtreecommitdiff
path: root/initramfs/script
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2012-07-13 00:52:52 -0700
committerKent Overstreet <koverstreet@google.com>2012-07-13 00:52:52 -0700
commit739b971d77c23f438fc25e03142fb3fbd4b93c0c (patch)
tree92bb5a60030971b6cc46826aef669989cef4c95f /initramfs/script
parenta3d0e5bafb42e42e16e00cd5e3d8522484d5d9de (diff)
Fix the initramfs script
Diffstat (limited to 'initramfs/script')
-rwxr-xr-xinitramfs/script32
1 files changed, 32 insertions, 0 deletions
diff --git a/initramfs/script b/initramfs/script
new file mode 100755
index 0000000..926d5d3
--- /dev/null
+++ b/initramfs/script
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+mountroot_fail()
+{
+ for i in `ls /dev/sd*`; do
+ echo $i > /sys/fs/bcache/register_quiet
+ done
+
+# for i in `ls /sys/dev/block/`; do
+# DEV=/bcache_dev
+#
+# mknod $DEV b `echo $i|sed -e 's/:/ /'`
+# echo $DEV > /sys/fs/bcache/register_quiet
+# rm $DEV
+# done
+}
+
+case $1 in
+prereqs)
+ exit 0
+ ;;
+mountfail)
+ mountroot_fail
+ exit 0
+ ;;
+esac
+
+. /scripts/functions
+
+add_mountroot_fail_hook "30-bcache"
+
+exit 0