updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / plymouth / plymouth.initcpio_install
blob8682878e11b6a261c169d99544865e827efb4101
1 build() {
2         add_dir /dev/pts
3         add_dir /usr/share/plymouth/themes
5         DATADIR="/usr/share"
6         PLYMOUTH_LOGO_FILE="${DATADIR}/plymouth/arch-logo.png"
7         PLYMOUTH_THEME_NAME="$(/usr/sbin/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)"
11         add_binary /sbin/plymouthd /bin/plymouthd
12         add_binary /bin/plymouth
14         add_file ${DATADIR}/plymouth/themes/text/text.plymouth
15         add_binary ${PLYMOUTH_PLUGIN_PATH}/text.so
16         add_file ${DATADIR}/plymouth/themes/details/details.plymouth
17         add_binary ${PLYMOUTH_PLUGIN_PATH}/details.so
20         add_file "${PLYMOUTH_LOGO_FILE}"
21         add_file /etc/system-release /etc/system-release
22         add_file /etc/plymouth/plymouthd.conf
24         if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
25             echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
26             exit 1
27         fi
29         add_binary ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so
31         add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so
32         add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/x11.so
33         add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so
35         if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
36             for x in ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/* ; do
37                 [ ! -f "$x" ] && break
38                 add_file $x
39             done
40         fi
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
49         SCRIPT='plymouth'
52 help() {
53         echo "This hook includes plymouth in the initramfs image."
56 # vim: set ft=sh:
57 #EOF