plymouth.initcpio_install 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. build() {
  2. add_dir /dev/pts
  3. add_dir /usr/share/plymouth/themes
  4. add_dir /var/run/plymouth
  5. DATADIR="/usr/share"
  6. PLYMOUTH_LOGO_FILE="${DATADIR}/plymouth/parabola-logo.png"
  7. PLYMOUTH_THEME_NAME="$(/usr/bin/plymouth-set-default-theme)"
  8. PLYMOUTH_MODULE_NAME="$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')"
  9. PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
  10. add_binary /usr/bin/plymouthd
  11. add_binary /usr/bin/plymouth
  12. add_file ${DATADIR}/plymouth/themes/text/text.plymouth
  13. add_binary ${PLYMOUTH_PLUGIN_PATH}/text.so
  14. add_file ${DATADIR}/plymouth/themes/details/details.plymouth
  15. add_binary ${PLYMOUTH_PLUGIN_PATH}/details.so
  16. add_file "${PLYMOUTH_LOGO_FILE}"
  17. add_file /etc/os-release
  18. add_file /etc/plymouth/plymouthd.conf
  19. add_file ${DATADIR}/plymouth/plymouthd.defaults
  20. if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
  21. echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
  22. exit 1
  23. fi
  24. add_binary ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so
  25. add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so
  26. add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so
  27. if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
  28. add_full_dir ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}
  29. fi
  30. add_file /usr/lib/udev/rules.d/70-uaccess.rules
  31. add_file /usr/lib/udev/rules.d/71-seat.rules
  32. # suppress a warning in glib (which the label control uses)
  33. # about uid 0 by building a dummy NSS stack (LP #649917)
  34. add_file /etc/passwd
  35. add_file /etc/nsswitch.conf
  36. add_binary "$(readlink -e /lib/libnss_files.so.2)"
  37. add_file /lib/libnss_files.so.2
  38. add_runscript
  39. }
  40. help() {
  41. echo "This hook includes plymouth in the initramfs image."
  42. }
  43. # vim: set ft=sh:
  44. #EOF