]>
Commit | Line | Data |
---|---|---|
c4f8329c TA |
1 | #!/bin/bash |
2 | ||
3 | # called by dracut | |
4 | check() { | |
ae9bc0d7 | 5 | require_binaries stratisd-init thin_check thin_repair mkfs.xfs xfs_admin xfs_growfs || return 1 |
c4f8329c TA |
6 | return 255 |
7 | } | |
8 | ||
9 | # called by dracut | |
10 | depends() { | |
11 | echo dm | |
12 | return 0 | |
13 | } | |
14 | ||
15 | # called by dracut | |
16 | installkernel() { | |
17 | instmods xfs | |
18 | } | |
19 | ||
20 | # called by dracut | |
21 | install() { | |
22 | ||
ae9bc0d7 | 23 | inst_multiple stratisd-init thin_check thin_repair mkfs.xfs xfs_admin xfs_growfs |
c4f8329c TA |
24 | |
25 | if dracut_module_included "systemd"; then | |
26 | inst_simple "${moddir}/stratisd-init.service" "${systemdsystemunitdir}/stratisd-init.service" | |
27 | mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants" | |
28 | ln -rfs "${initdir}${systemdsystemunitdir}/stratisd-init.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/stratisd-init.service" | |
29 | else | |
30 | inst_hook cmdline 25 "$moddir/stratisd-start.sh" | |
31 | inst_hook cleanup 25 "$moddir/stratisd-stop.sh" | |
32 | fi | |
33 | } | |
34 |