# $Id$ provide basic-splash plymouthd require basic-boot get_boot_splash() { if grep "^export GRUB_CMDLINE_BOOTSPLASH=.*splash" ${MROOT}/etc/conf.d/grub then mecho "bootsplash currently enabled" rvecho "1" else mecho "bootsplash currently disabled" rvecho "0" fi } set_boot_splash() { local action="$1" [[ -z ${action} ]] && help_boot_splash && return 1 case "${action}" in enable) sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash\":" ${MROOT}/etc/conf.d/grub helper_boot_rebuild_bootconfig mecho "bootsplash enabled" ;; disable) sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"rd.plymouth=0\":" ${MROOT}/etc/conf.d/grub helper_boot_rebuild_bootconfig mecho "bootsplash disabled" ;; *) help_system_autologon && return 1 ;; esac } get_boot_theme() { local action="$1" local i local chrooted if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]] then chrooted="system_chroot" fi case "${action}" in current) rvecho "$(${chrooted} plymouth-set-default-theme)" ;; system) for i in $(${chrooted} plymouth-set-default-theme --list) do rvecho "${i}" done ;; *) help_boot_theme return 1 ;; esac } set_boot_theme() { local theme="$1" local themedir="${MROOT}/usr/share/plymouth/themes" [[ -z ${theme} ]] && help_boot_theme && return 1 local chrooted if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]] then chrooted="system_chroot" fi if [[ -d ${themedir}/${theme} ]] then ${chrooted} plymouth-set-default-theme ${theme} mecho "Selected theme '${theme}'." else eecho "Theme '${theme}' not available on this system. Aborted!" fi }