Browse Source

plymouth: install all themes and make them selectable by command line

Bootsplash - plymouth
       rd_plytheme=<theme name>
              specify the plymouth bootsplash theme (fallback is text)
master
Harald Hoyer 16 years ago
parent
commit
7c00784e5c
  1. 5
      dracut.8
  2. 1
      dracut.spec
  3. 1
      modules.d/50plymouth/install
  4. 19
      modules.d/50plymouth/parse-plymouth.sh
  5. 31
      modules.d/50plymouth/plymouth-populate-initrd
  6. 10
      modules.d/50plymouth/plymouth-pretrigger.sh

5
dracut.8

@ -99,6 +99,11 @@ will be written to /etc/sysconfig/i18n in the initramfs @@ -99,6 +99,11 @@ will be written to /etc/sysconfig/i18n in the initramfs
.B LANG=<locale>
will be written to /etc/sysconfig/i18n in the initramfs

.SH Bootsplash - plymouth
.TP
.B rd_plytheme=<theme name>
specify the plymouth bootsplash theme (fallback is text)

.SH LVM
.TP
.B rd_NO_LVM

1
dracut.spec

@ -65,6 +65,7 @@ Requires: ql2200-firmware @@ -65,6 +65,7 @@ Requires: ql2200-firmware
Requires: ql23xx-firmware
Requires: ql2400-firmware
Requires: ql2500-firmware
Requires: plymouth-system-theme plymouth-theme-charge plymouth-theme-solar

%description generic
This package requires everything which is needed to build a generic

1
modules.d/50plymouth/install

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#!/bin/bash
. "$moddir"/plymouth-populate-initrd
inst_hook cmdline 30 "$moddir/parse-plymouth.sh"
inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh

19
modules.d/50plymouth/parse-plymouth.sh

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
initrdargs="$initrdargs rd_plytheme"

PLYMOUTH_THEMEDIR=/usr/share/plymouth/themes
PLYMOUTH_THEME=$(getarg rd_plytheme=)
if [ -n "$PLYMOUTH_THEME" ]; then
if [ -f "${PLYMOUTH_THEMEDIR}/${PLYMOUTH_THEME}/${PLYMOUTH_THEME}.plymouth" ]; then
info "Setting theme $PLYMOUTH_THEME"
(
cd $PLYMOUTH_THEMEDIR;
ln -fs "${PLYMOUTH_THEME}/${PLYMOUTH_THEME}.plymouth" default.plymouth 2>&1 | vinfo;
)
else
warn "Theme $PLYMOUTH_THEME not found!"
fi
fi

unset PLYMOUTH_THEME
unset PLYMOUTH_THEMEDIR

31
modules.d/50plymouth/plymouth-populate-initrd

@ -8,19 +8,18 @@ PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png" @@ -8,19 +8,18 @@ PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png"
PLYMOUTH_THEME=$(plymouth-set-default-theme)

inst /sbin/plymouthd /bin/plymouthd
dracut_install /bin/plymouth "${LIBDIR}/plymouth/text.so" \
"${LIBDIR}/plymouth/details.so" \
"/usr/share/plymouth/themes/details/details.plymouth" \
"/usr/share/plymouth/themes/text/text.plymouth" \
dracut_install /bin/plymouth \
"${PLYMOUTH_LOGO_FILE}" \
/etc/system-release

if [[ -f "${LIBDIR}/plymouth/${PLYMOUTH_THEME:=text}.so" ]]; then
dracut_install "${LIBDIR}/plymouth/${PLYMOUTH_THEME:=text}.so"
fi

mkdir -p "${initdir}/usr/share/plymouth"

if [[ $hostonly ]]; then
dracut_install "${LIBDIR}/plymouth/text.so" \
"${LIBDIR}/plymouth/details.so" \
"/usr/share/plymouth/themes/details/details.plymouth" \
"/usr/share/plymouth/themes/text/text.plymouth" \

if [[ -d /usr/share/plymouth/themes/${PLYMOUTH_THEME} ]]; then
for x in "/usr/share/plymouth/themes/${PLYMOUTH_THEME}"/* ; do
[[ -f "$x" ]] || break
@ -34,5 +33,21 @@ if [ -L /usr/share/plymouth/themes/default.plymouth ]; then @@ -34,5 +33,21 @@ if [ -L /usr/share/plymouth/themes/default.plymouth ]; then
PLYMOUTH_PLUGIN=$(grep "^ModuleName=" /usr/share/plymouth/themes/default.plymouth |awk -F= {'print $2'})
inst ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN}.so
fi
else
for x in /usr/share/plymouth/themes/*/* ; do
[[ -f "$x" ]] || continue
THEME_DIR=$(dirname "$x")
mkdir -p "${initdir}/$THEME_DIR"
dracut_install "$x"
done
for x in ${LIBDIR}/plymouth/*.so ; do
[[ -f "$x" ]] || continue
dracut_install "$x"
done
(
cd ${initdir}/usr/share/plymouth/themes;
ln -s text/text.plymouth default.plymouth 2>&1;
)
fi

# vim:ts=8:sw=4:sts=4:et

10
modules.d/50plymouth/plymouth-pretrigger.sh

@ -1,14 +1,12 @@ @@ -1,14 +1,12 @@
#!/bin/sh

[ -c /dev/null ] || mknod /dev/null c 1 3
# first trigger graphics subsystem
udevadm trigger --attr-match=class=0x030000
udevadm trigger --attr-match=class=0x030000 >/dev/null 2>&1
# first trigger graphics and tty subsystem
udevadm trigger --subsystem-match=graphics --subsystem-match=tty >/dev/null 2>&1
# add nomatch for full trigger
udevtriggeropts="$udevtriggeropts --subsystem-nomatch=graphics --subsystem-nomatch=tty"

udevadm settle --timeout=30 >/dev/null 2>&1
[ -c /dev/null ] || mknod /dev/null c 1 3
udevadm settle --timeout=30 2>&1 | vinfo
[ -c /dev/zero ] || mknod /dev/zero c 1 5
[ -c /dev/systty ] || mknod /dev/systty c 4 0
[ -c /dev/fb ] || mknod /dev/fb c 29 0
@ -16,5 +14,5 @@ udevadm settle --timeout=30 >/dev/null 2>&1 @@ -16,5 +14,5 @@ udevadm settle --timeout=30 >/dev/null 2>&1

info "Starting plymouth daemon"
[ -x /bin/plymouthd ] && /bin/plymouthd
/bin/plymouth --show-splash
/bin/plymouth --show-splash 2>&1 | vinfo


Loading…
Cancel
Save