upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / plymouth / trunk / plymouth.initcpio_install
blob5106acddee8286ac638cd6863522f9e1d788f7f6
1 #!/bin/bash
3 build() {
4 # get default theme settings
5 local PLYMOUTH_THEME_NAME=$(plymouth-set-default-theme)
6 local PLYMOUTH_THEME_DIR="/usr/share/plymouth/themes/$PLYMOUTH_THEME_NAME"
7 local PLYMOUTH_MODULE_NAME=$(sed -n "s/^ *ModuleName *= *//p" "$PLYMOUTH_THEME_DIR/$PLYMOUTH_THEME_NAME.plymouth")
8 local PLYMOUTH_IMAGE_DIR=$(sed -n "s/^ *ImageDir *= *//p" "$PLYMOUTH_THEME_DIR/$PLYMOUTH_THEME_NAME.plymouth")
9 local PLYMOUTH_FONT_NAME=$(sed -n "s/^ *Font *= *\([^ ]*\).*/\1/p" "$PLYMOUTH_THEME_DIR/$PLYMOUTH_THEME_NAME.plymouth")
10 local PLYMOUTH_FONT_PATH=$(fc-match -f %{file} "$PLYMOUTH_FONT_NAME")
12 # exit if no module exists on the system for the theme
13 if [ ! -f "/usr/lib/plymouth/$PLYMOUTH_MODULE_NAME.so" ]; then
14 error "The default plymouth plugin (%s) doesn't exist" "$PLYMOUTH_MODULE_NAME"
15 return 1
18 # copy binaries and base plugins
19 map add_binary \
20 'plymouthd' \
21 'plymouth' \
22 '/usr/lib/plymouth/plymouthd-fd-escrow' \
23 '/usr/lib/plymouth/text.so' \
24 '/usr/lib/plymouth/details.so' \
25 '/usr/lib/plymouth/label.so' \
26 '/usr/lib/plymouth/renderers/drm.so' \
27 '/usr/lib/plymouth/renderers/frame-buffer.so' \
28 "/usr/lib/plymouth/$PLYMOUTH_MODULE_NAME.so"
30 # copy base themes and logo
31 map add_file \
32 '/usr/share/plymouth/themes/text/text.plymouth' \
33 '/usr/share/plymouth/themes/details/details.plymouth' \
34 '/usr/share/pixmaps/archlinux-logo.png' \
35 '/usr/share/plymouth/plymouthd.defaults' \
36 '/etc/plymouth/plymouthd.conf' \
37 "$PLYMOUTH_FONT_PATH"
39 # copy configured theme
40 if [ -d "$PLYMOUTH_THEME_DIR" ]; then
41 add_full_dir "$PLYMOUTH_THEME_DIR"
44 # copy images for the configured theme
45 if [ "$PLYMOUTH_IMAGE_DIR" != "$PLYMOUTH_THEME_DIR" -a -d "$PLYMOUTH_IMAGE_DIR" ]; then
46 add_full_dir "$PLYMOUTH_IMAGE_DIR"
49 # needed to access DRM devices
50 add_udev_rule '71-seat.rules'
52 # copy systemd unit files for systemd boot, otherwise use runscript
53 if command -v add_systemd_unit >/dev/null; then
54 map add_systemd_unit \
55 'plymouth-halt.service' \
56 'plymouth-kexec.service' \
57 'plymouth-poweroff.service' \
58 'plymouth-quit-wait.service' \
59 'plymouth-quit.service' \
60 'plymouth-reboot.service' \
61 'plymouth-start.service' \
62 'plymouth-switch-root.service' \
63 'systemd-ask-password-plymouth.path' \
64 'systemd-ask-password-plymouth.service'
65 else
66 add_runscript
70 help() {
71 cat <<HELPEOF
72 This hook includes Plymouth in initramfs. It shows a graphical splash screen
73 during boot if the 'splash' kernel parameter is specified.
74 HELPEOF