]> git.proxmox.com Git - mirror_zfs-debian.git/blob - dracut/90zfs/module-setup.sh
Move 90-zfs udev rule from dracut to udev/rules.d
[mirror_zfs-debian.git] / dracut / 90zfs / module-setup.sh
1 #!/bin/sh
2
3 check() {
4 # We depend on udev-rules being loaded
5 [ "$1" = "-d" ] && return 0
6
7 # Verify the zfs tool chain
8 which zpool >/dev/null 2>&1 || return 1
9 which zfs >/dev/null 2>&1 || return 1
10
11 return 0
12 }
13
14 depends() {
15 echo udev-rules
16 return 0
17 }
18
19 installkernel() {
20 instmods zfs
21 instmods zcommon
22 instmods znvpair
23 instmods zavl
24 instmods zunicode
25 instmods spl
26 instmods zlib_deflate
27 instmods zlib_inflate
28 }
29
30 install() {
31 inst_rules /lib/udev/rules.d/90-zfs.rules
32 inst_rules /lib/udev/rules.d/60-zpool.rules
33 inst_rules /lib/udev/rules.d/60-zvol.rules
34 inst /etc/zfs/zdev.conf
35 inst /etc/zfs/zpool.cache
36 inst /etc/hostid
37 dracut_install zfs
38 dracut_install zpool
39 dracut_install zpool_layout
40 dracut_install zpool_id
41 dracut_install zvol_id
42 dracut_install mount.zfs
43 dracut_install hostid
44 inst_hook cmdline 95 "$moddir/parse-zfs.sh"
45 inst_hook mount 98 "$moddir/mount-zfs.sh"
46 }