mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
33 lines
415 B
Plaintext
33 lines
415 B
Plaintext
|
#!/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
|