]> git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/50plymouth/module-setup.sh
Factor out all the "type -V" commands
[thirdparty/dracut.git] / modules.d / 50plymouth / 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 # called by dracut
6 check() {
7 [[ "$mount_needs" ]] && return 1
8 require_binaries plymouthd plymouth
9 }
10
11 # called by dracut
12 depends() {
13 echo drm
14 }
15
16 # called by dracut
17 install() {
18 if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \
19 || [ ! -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
20 . "$moddir"/plymouth-populate-initrd.sh
21 else
22 PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \
23 /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir"
24 fi
25
26 inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
27
28 inst_multiple readlink
29
30 if ! dracut_module_included "systemd"; then
31 inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
32 inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
33 fi
34 }
35