summaryrefslogtreecommitdiff
path: root/pcr/plymouth/sd-plymouth.initcpio_install
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-02-01 16:01:03 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-02-01 17:11:38 +0100
commit521cb9ea33455efb81c012746c4803479c662169 (patch)
tree31a02b307ca9cd53104eebcfb5713a7ad82a2fa5 /pcr/plymouth/sd-plymouth.initcpio_install
parentc2c2ccd0a2156cb401f16bb6d819419e0fa9b06f (diff)
downloadabslibre-521cb9ea33455efb81c012746c4803479c662169.tar.gz
abslibre-521cb9ea33455efb81c012746c4803479c662169.tar.bz2
abslibre-521cb9ea33455efb81c012746c4803479c662169.zip
pcr/plymouth: updated to 0.9.3
Diffstat (limited to 'pcr/plymouth/sd-plymouth.initcpio_install')
-rw-r--r--pcr/plymouth/sd-plymouth.initcpio_install63
1 files changed, 63 insertions, 0 deletions
diff --git a/pcr/plymouth/sd-plymouth.initcpio_install b/pcr/plymouth/sd-plymouth.initcpio_install
new file mode 100644
index 000000000..a45a5f220
--- /dev/null
+++ b/pcr/plymouth/sd-plymouth.initcpio_install
@@ -0,0 +1,63 @@
+#!/bin/bash
+# /etc/initcpio/install/sd-plymouth — mkinitcpio/systemd hook for plymouth
+
+build() {
+ add_dir /dev/pts
+ add_dir /usr/share/plymouth/themes
+ add_dir /run/plymouth
+
+ DATADIR="/usr/share"
+# PLYMOUTH_LOGO_FILE="${DATADIR}/plymouth/arch-logo.png"
+ PLYMOUTH_THEME_NAME="$(/usr/bin/plymouth-set-default-theme)"
+ PLYMOUTH_MODULE_NAME="$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')"
+ PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
+
+ add_binary /usr/bin/plymouthd
+ add_binary /usr/bin/plymouth
+
+ add_file ${DATADIR}/plymouth/themes/text/text.plymouth
+ add_binary ${PLYMOUTH_PLUGIN_PATH}/text.so
+ add_file ${DATADIR}/plymouth/themes/details/details.plymouth
+ add_binary ${PLYMOUTH_PLUGIN_PATH}/details.so
+
+ add_file "${PLYMOUTH_LOGO_FILE}"
+ add_file /etc/os-release
+ add_file /etc/plymouth/plymouthd.conf
+ add_file ${DATADIR}/plymouth/plymouthd.defaults
+
+ if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
+ echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
+ exit 1
+ fi
+
+ add_binary ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so
+
+ add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so
+ add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so
+
+ if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
+ add_full_dir ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}
+ fi
+
+ add_udev_rule 70-uaccess.rules
+ add_udev_rule 71-seat.rules
+
+ map add_systemd_unit \
+ systemd-ask-password-plymouth.path \
+ systemd-ask-password-plymouth.service \
+ plymouth-halt.service \
+ plymouth-kexec.service \
+ plymouth-poweroff.service \
+ plymouth-quit-wait.service \
+ plymouth-quit.service \
+ plymouth-read-write.service \
+ plymouth-reboot.service \
+ plymouth-start.service \
+ plymouth-switch-root.service
+}
+
+help() {
+ cat <<HELPEOF
+This hook includes plymouth in a systemd-based initramfs image.
+HELPEOF
+}