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
parent
53e1c5b996
commit
7c00784e5c
5
dracut.8
5
dracut.8
|
@ -99,6 +99,11 @@ will be written to /etc/sysconfig/i18n in the initramfs
|
||||||
.B LANG=<locale>
|
.B LANG=<locale>
|
||||||
will be written to /etc/sysconfig/i18n in the initramfs
|
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
|
.SH LVM
|
||||||
.TP
|
.TP
|
||||||
.B rd_NO_LVM
|
.B rd_NO_LVM
|
||||||
|
|
|
@ -65,6 +65,7 @@ Requires: ql2200-firmware
|
||||||
Requires: ql23xx-firmware
|
Requires: ql23xx-firmware
|
||||||
Requires: ql2400-firmware
|
Requires: ql2400-firmware
|
||||||
Requires: ql2500-firmware
|
Requires: ql2500-firmware
|
||||||
|
Requires: plymouth-system-theme plymouth-theme-charge plymouth-theme-solar
|
||||||
|
|
||||||
%description generic
|
%description generic
|
||||||
This package requires everything which is needed to build a generic
|
This package requires everything which is needed to build a generic
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. "$moddir"/plymouth-populate-initrd
|
. "$moddir"/plymouth-populate-initrd
|
||||||
|
inst_hook cmdline 30 "$moddir/parse-plymouth.sh"
|
||||||
inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
|
inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
|
||||||
inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
|
inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
|
||||||
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
|
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -8,31 +8,46 @@ PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png"
|
||||||
PLYMOUTH_THEME=$(plymouth-set-default-theme)
|
PLYMOUTH_THEME=$(plymouth-set-default-theme)
|
||||||
|
|
||||||
inst /sbin/plymouthd /bin/plymouthd
|
inst /sbin/plymouthd /bin/plymouthd
|
||||||
dracut_install /bin/plymouth "${LIBDIR}/plymouth/text.so" \
|
dracut_install /bin/plymouth \
|
||||||
"${LIBDIR}/plymouth/details.so" \
|
|
||||||
"/usr/share/plymouth/themes/details/details.plymouth" \
|
|
||||||
"/usr/share/plymouth/themes/text/text.plymouth" \
|
|
||||||
"${PLYMOUTH_LOGO_FILE}" \
|
"${PLYMOUTH_LOGO_FILE}" \
|
||||||
/etc/system-release
|
/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"
|
mkdir -p "${initdir}/usr/share/plymouth"
|
||||||
|
|
||||||
if [[ -d /usr/share/plymouth/themes/${PLYMOUTH_THEME} ]]; then
|
if [[ $hostonly ]]; then
|
||||||
for x in "/usr/share/plymouth/themes/${PLYMOUTH_THEME}"/* ; do
|
dracut_install "${LIBDIR}/plymouth/text.so" \
|
||||||
[[ -f "$x" ]] || break
|
"${LIBDIR}/plymouth/details.so" \
|
||||||
inst $x
|
"/usr/share/plymouth/themes/details/details.plymouth" \
|
||||||
done
|
"/usr/share/plymouth/themes/text/text.plymouth" \
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -L /usr/share/plymouth/themes/default.plymouth ]; then
|
if [[ -d /usr/share/plymouth/themes/${PLYMOUTH_THEME} ]]; then
|
||||||
inst /usr/share/plymouth/themes/default.plymouth
|
for x in "/usr/share/plymouth/themes/${PLYMOUTH_THEME}"/* ; do
|
||||||
# Install plugin for this theme
|
[[ -f "$x" ]] || break
|
||||||
PLYMOUTH_PLUGIN=$(grep "^ModuleName=" /usr/share/plymouth/themes/default.plymouth |awk -F= {'print $2'})
|
inst $x
|
||||||
inst ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN}.so
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -L /usr/share/plymouth/themes/default.plymouth ]; then
|
||||||
|
inst /usr/share/plymouth/themes/default.plymouth
|
||||||
|
# Install plugin for this theme
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
# vim:ts=8:sw=4:sts=4:et
|
# vim:ts=8:sw=4:sts=4:et
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -c /dev/null ] || mknod /dev/null c 1 3
|
||||||
# first trigger graphics subsystem
|
# 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
|
# first trigger graphics and tty subsystem
|
||||||
udevadm trigger --subsystem-match=graphics --subsystem-match=tty >/dev/null 2>&1
|
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
|
udevadm settle --timeout=30 2>&1 | vinfo
|
||||||
[ -c /dev/null ] || mknod /dev/null c 1 3
|
|
||||||
[ -c /dev/zero ] || mknod /dev/zero c 1 5
|
[ -c /dev/zero ] || mknod /dev/zero c 1 5
|
||||||
[ -c /dev/systty ] || mknod /dev/systty c 4 0
|
[ -c /dev/systty ] || mknod /dev/systty c 4 0
|
||||||
[ -c /dev/fb ] || mknod /dev/fb c 29 0
|
[ -c /dev/fb ] || mknod /dev/fb c 29 0
|
||||||
|
@ -16,5 +14,5 @@ udevadm settle --timeout=30 >/dev/null 2>&1
|
||||||
|
|
||||||
info "Starting plymouth daemon"
|
info "Starting plymouth daemon"
|
||||||
[ -x /bin/plymouthd ] && /bin/plymouthd
|
[ -x /bin/plymouthd ] && /bin/plymouthd
|
||||||
/bin/plymouth --show-splash
|
/bin/plymouth --show-splash 2>&1 | vinfo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue