aboutsummaryrefslogtreecommitdiffstats
path: root/initramfs/script
blob: 926d5d3e310e4b1206ea1bfed5b253ad35780780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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