]> git.sesse.net Git - bcachefs-tools-debian/blob - dracut/module-setup.sh
endianness
[bcachefs-tools-debian] / dracut / module-setup.sh
1 #!/bin/bash
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4
5 #
6 # At some point (util-linux v2.24) blkid will be able to identify bcache
7 # but until every system has this version of util-linux, probe-bcache is
8 # provided as an alternative.
9 #
10
11 check() {
12     if [[ $hostonly ]] || [[ $mount_needs ]]
13     then
14         for fs in "${host_fs_types[@]}"; do
15             [[ $fs = "bcache" ]] && return 0
16         done
17         return 255
18     fi
19
20     return 0
21 }
22
23 depends() {
24     return 0
25 }
26
27 installkernel() {
28     instmods bcache
29 }
30
31 install() {
32     inst_multiple ${udevdir}/probe-bcache ${udevdir}/bcache-register
33     inst_rules 69-bcache.rules
34 }