Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. build() {
  2. add_dir /dev/pts
  3. add_dir /usr/share/plymouth/themes
  4. add_dir /var/run/plymouth
  5.  
  6. DATADIR="/usr/share"
  7. PLYMOUTH_LOGO_FILE="${DATADIR}/plymouth/arch-logo.png"
  8. PLYMOUTH_THEME_NAME="$(/usr/bin/plymouth-set-default-theme)"
  9. PLYMOUTH_MODULE_NAME="$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')"
  10. PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
  11.  
  12. add_binary /usr/bin/plymouthd
  13. add_binary /usr/bin/plymouth
  14.  
  15. add_file ${DATADIR}/plymouth/themes/text/text.plymouth
  16. add_binary ${PLYMOUTH_PLUGIN_PATH}/text.so
  17. add_file ${DATADIR}/plymouth/themes/details/details.plymouth
  18. add_binary ${PLYMOUTH_PLUGIN_PATH}/details.so
  19.  
  20. add_file "${PLYMOUTH_LOGO_FILE}"
  21. add_file /etc/os-release
  22. add_file /etc/plymouth/plymouthd.conf
  23. add_file ${DATADIR}/plymouth/plymouthd.defaults
  24.  
  25. if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
  26. echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
  27. exit 1
  28. fi
  29.  
  30. add_binary ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so
  31.  
  32. add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so
  33. add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so
  34.  
  35. if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
  36. add_full_dir ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}
  37. fi
  38.  
  39. add_file /usr/lib/udev/rules.d/70-uaccess.rules
  40. add_file /usr/lib/udev/rules.d/71-seat.rules
  41.  
  42. # suppress a warning in glib (which the label control uses)
  43. # about uid 0 by building a dummy NSS stack (LP #649917)
  44. add_file /etc/passwd
  45. add_file /etc/nsswitch.conf
  46. add_binary "$(readlink -e /lib/libnss_files.so.2)"
  47. add_file /lib/libnss_files.so.2
  48.  
  49. add_runscript
  50. }
  51.  
  52. help() {
  53. echo "This hook includes plymouth in the initramfs image."
  54. }
  55.  
  56. # vim: set ft=sh:
  57. #EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement