]> git.sesse.net Git - bcachefs-tools-debian/blob - initramfs/script
Fix the initramfs script
[bcachefs-tools-debian] / initramfs / script
1 #!/bin/sh
2
3 mountroot_fail()
4 {
5         for i in `ls /dev/sd*`; do
6                 echo    $i > /sys/fs/bcache/register_quiet
7         done
8
9 #       for i in `ls /sys/dev/block/`; do
10 #               DEV=/bcache_dev
11 #
12 #               mknod   $DEV b `echo $i|sed -e 's/:/ /'`
13 #               echo    $DEV > /sys/fs/bcache/register_quiet
14 #               rm      $DEV
15 #       done
16 }
17
18 case $1 in
19 prereqs)
20         exit 0
21         ;;
22 mountfail)
23         mountroot_fail
24         exit 0
25         ;;
26 esac
27
28 . /scripts/functions
29
30 add_mountroot_fail_hook "30-bcache"
31
32 exit 0