From 7bf26d686e5c4588c2cca1f78bfb6d5ab4b9333f Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 11 Sep 2019 14:59:55 -0400 Subject: plymouth 0.9.4 without systemd --- plymouth/debian/local/debian-logo.png | Bin 0 -> 5834 bytes plymouth/debian/local/plymouth-update-initrd | 5 + plymouth/debian/local/plymouth.hook | 163 +++++++++++++++++++++++++++ plymouth/debian/local/plymouth.init-bottom | 17 +++ plymouth/debian/local/plymouth.init-premount | 37 ++++++ plymouth/debian/local/plymouth.lsb | 37 ++++++ plymouth/debian/local/plymouth.panic | 17 +++ 7 files changed, 276 insertions(+) create mode 100644 plymouth/debian/local/debian-logo.png create mode 100644 plymouth/debian/local/plymouth-update-initrd create mode 100644 plymouth/debian/local/plymouth.hook create mode 100644 plymouth/debian/local/plymouth.init-bottom create mode 100644 plymouth/debian/local/plymouth.init-premount create mode 100644 plymouth/debian/local/plymouth.lsb create mode 100644 plymouth/debian/local/plymouth.panic (limited to 'plymouth/debian/local') diff --git a/plymouth/debian/local/debian-logo.png b/plymouth/debian/local/debian-logo.png new file mode 100644 index 0000000..4dec516 Binary files /dev/null and b/plymouth/debian/local/debian-logo.png differ diff --git a/plymouth/debian/local/plymouth-update-initrd b/plymouth/debian/local/plymouth-update-initrd new file mode 100644 index 0000000..e6847bb --- /dev/null +++ b/plymouth/debian/local/plymouth-update-initrd @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +update-initramfs -u diff --git a/plymouth/debian/local/plymouth.hook b/plymouth/debian/local/plymouth.hook new file mode 100644 index 0000000..cf0c3a9 --- /dev/null +++ b/plymouth/debian/local/plymouth.hook @@ -0,0 +1,163 @@ +#!/bin/sh + +set -e + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +THEME="$(/usr/sbin/plymouth-set-default-theme || true)" +THEMES="/usr/share/plymouth/themes" + +if [ -n "${THEME}" ] +then + THEME_NAME="${THEME}" + THEME="${THEMES}/${THEME}/${THEME}.plymouth" +else + exit 0 +fi + +PLUGIN_PATH="$(plymouth --get-splash-plugin-path)" + +case "${THEME_NAME}" in + text|details|tribar) + PLUGINS="text.so details.so" + ;; + + *) + PLUGINS="text.so details.so label.so" + ;; +esac + +MODULE="${PLUGIN_PATH}/$(sed -n 's/^ModuleName=\(.*\)/\1/p' ${THEME}).so" + +if [ ! -e "$MODULE" ] +then + echo "W: plymouth module ($MODULE) missing, skipping plymouth." + exit 0 +fi + +# copy plugin and images for current theme +copy_exec "${MODULE}" +mkdir -p "${DESTDIR}/${THEMES}" +cp -r "${THEMES}/${THEME_NAME}" "${DESTDIR}/${THEMES}" + +# copy binaries and base plugins +copy_exec /bin/plymouth +copy_exec /sbin/plymouthd + +for PLUGIN in ${PLUGINS} +do + if [ -f ${PLUGIN_PATH}/${PLUGIN} ] + then + copy_exec ${PLUGIN_PATH}/${PLUGIN} + else + echo "W: plymouth: The plugin ${PLUGIN} is missing, the selected theme might not work as expected." + echo "W: plymouth: You might want to install the plymouth-themes package to fix this." + fi +done + +# copy base themes and logo +cp -a "${THEMES}/details" "${DESTDIR}/${THEMES}" +cp -a "${THEMES}/text" "${DESTDIR}/${THEMES}" + +if [ -f /etc/os-release ] +then + cp /etc/os-release "${DESTDIR}/etc" +fi + +case "${THEME_NAME}" in + text|details) + + ;; + + *) + cp /usr/share/plymouth/debian-logo.png "${DESTDIR}/usr/share/plymouth" + + # fontconfig + mkdir -p "${DESTDIR}/etc/fonts/conf.d" + cp -a /etc/fonts/fonts.conf "${DESTDIR}/etc/fonts" + cp -rL /etc/fonts/conf.d/60-latin.conf "${DESTDIR}/etc/fonts/conf.d" + mkdir -p "${DESTDIR}/var/cache/fontconfig" + # This is only needed because fc-cache bellow fails if the directory doesn't exist + mkdir -p "${DESTDIR}/usr/local/share/fonts" + + # fonts-dejavu + if [ -e /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf ] + then + # jessie + mkdir -p "${DESTDIR}/usr/share/fonts/truetype/dejavu" + cp -a /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf "${DESTDIR}/usr/share/fonts/truetype/dejavu" + cp -a /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf "${DESTDIR}/usr/share/fonts/truetype/dejavu" + else + # wheezy + mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu" + cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu" + cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu" + fi + fc-cache -s -y "${DESTDIR}" > /dev/null 2>&1 + + # pango + if ls /usr/lib/@DEB_HOST_MULTIARCH@/pango/1* > /dev/null 2>&1 + then + # wheezy + PANGO_VERSION="$(ls /usr/lib/@DEB_HOST_MULTIARCH@/pango)" + + mkdir -p "${DESTDIR}/usr/lib/@DEB_HOST_MULTIARCH@/pango/${PANGO_VERSION}/module-files.d" + mkdir -p "${DESTDIR}/usr/lib/@DEB_HOST_MULTIARCH@/pango/${PANGO_VERSION}/modules" + cp /usr/lib/@DEB_HOST_MULTIARCH@/pango/${PANGO_VERSION}/module-files.d/libpango1.0-0.modules ${DESTDIR}/usr/lib/@DEB_HOST_MULTIARCH@/pango/${PANGO_VERSION}/module-files.d/ + copy_exec /usr/lib/@DEB_HOST_MULTIARCH@/pango/${PANGO_VERSION}/modules/pango-basic-fc.so + else + # jessie + copy_exec /usr/lib/@DEB_HOST_MULTIARCH@/libpango-1.0.so.0 + fi + ;; +esac + +# add drm modules +copy_modules_dir kernel/drivers/gpu/drm mga r128 savage sis tdfx via + +# copy renderers +copy_exec /usr/lib/@DEB_HOST_MULTIARCH@/plymouth/renderers/frame-buffer.so +copy_exec /usr/lib/@DEB_HOST_MULTIARCH@/plymouth/renderers/drm.so + +# copy config files +mkdir -p "${DESTDIR}/etc/plymouth" + +if [ -r /etc/plymouth/plymouthd.conf ] +then + cp -a /etc/plymouth/plymouthd.conf "${DESTDIR}/etc/plymouth/" +fi + +cp -a /usr/share/plymouth/plymouthd.defaults "${DESTDIR}/usr/share/plymouth/" + +# temporarily include dummy root account lookup (#691598) +if ! grep -qs '^root:' "${DESTDIR}/etc/passwd" +then + echo "root:x:0:0:root:/root:/bin/sh" >> "${DESTDIR}/etc/passwd" +fi + +if ! grep -qs '^passwd: files' "${DESTDIR}/etc/nsswitch.conf" +then + echo "passwd: files" >> "${DESTDIR}/etc/nsswitch.conf" +fi + +for _LIBRARY in /lib/@DEB_HOST_MULTIARCH@/libnss_files* +do + if [ -e "${_LIBRARY}" ] + then + copy_exec "${_LIBRARY}" + fi +done diff --git a/plymouth/debian/local/plymouth.init-bottom b/plymouth/debian/local/plymouth.init-bottom new file mode 100644 index 0000000..e7d9249 --- /dev/null +++ b/plymouth/debian/local/plymouth.init-bottom @@ -0,0 +1,17 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "${PREREQ}" +} + +case ${1} in + prereqs) + prereqs + exit 0 + ;; +esac + +/bin/plymouth --newroot=${rootmnt} diff --git a/plymouth/debian/local/plymouth.init-premount b/plymouth/debian/local/plymouth.init-premount new file mode 100644 index 0000000..e5a7db6 --- /dev/null +++ b/plymouth/debian/local/plymouth.init-premount @@ -0,0 +1,37 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "${PREREQ}" +} + +case ${1} in + prereqs) + prereqs + exit 0 + ;; +esac + +SPLASH="true" + +for ARGUMENT in $(cat /proc/cmdline) +do + case "${ARGUMENT}" in + splash*) + SPLASH="true" + ;; + + nosplash*|plymouth.enable=0) + SPLASH="false" + ;; + esac +done + +if [ "${SPLASH}" = "true" ] +then + mkdir -m 0755 /run/plymouth + /sbin/plymouthd --mode=boot --attach-to-session --pid-file=/run/plymouth/pid + /bin/plymouth --show-splash +fi diff --git a/plymouth/debian/local/plymouth.lsb b/plymouth/debian/local/plymouth.lsb new file mode 100644 index 0000000..ab13585 --- /dev/null +++ b/plymouth/debian/local/plymouth.lsb @@ -0,0 +1,37 @@ +# /lib/lsb/init-functions.d/99-plymouth + +# Abort sourcing of this file if plymouth isn't active +if ! plymouth --ping > /dev/null 2>&1 +then + return +fi + +log_begin_msg_post () +{ + /bin/plymouth update --status="${@}" || true + } + +log_end_msg_post () +{ + : +} + +log_action_begin_msg_post () +{ + /bin/plymouth update --status="${@}" || true +} + +log_action_end_msg_post () +{ + : +} + +log_action_msg_post () +{ + /bin/plymouth update --status="${@}" || true +} + +log_daemon_msg_post () +{ + /bin/plymouth update --status="${@}" || true +} diff --git a/plymouth/debian/local/plymouth.panic b/plymouth/debian/local/plymouth.panic new file mode 100644 index 0000000..39e4532 --- /dev/null +++ b/plymouth/debian/local/plymouth.panic @@ -0,0 +1,17 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +/bin/plymouth quit -- cgit