# $Id$ provide basic-splash fbsplash require basic-boot get_boot_splash() { local var var=$(grep "^export GRUB_CMDLINE_BOOTSPLASH=" ${MROOT}@@CONFDDIR@@/grub | sed "s:.*splash=\(.*\),.*:\1:") case "${var}" in silent|"") mecho "bootsplash currently enabled"; rvecho "1" ;; verbose) mecho "bootsplash currently disabled"; rvecho "0" ;; *) eecho "unkown state" ;; esac } 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=silent,theme=default\":" ${MROOT}@@CONFDDIR@@/grub helper_boot_rebuild_bootconfig mecho "bootsplash enabled" ;; disable) sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=verbose,theme=default\":" ${MROOT}@@CONFDDIR@@/grub helper_boot_rebuild_bootconfig mecho "bootsplash disabled" ;; *) help_system_autologon && return 1 ;; esac } get_boot_theme() { local action="$1" local themedir="${MROOT}@@SYSCONFDIR@@/splash/themes" local theme local i case "${action}" in current) if [[ -L ${themedir}/default ]] then theme=$(readlink ${themedir}/default) rvecho "${theme}" else rvecho "none" fi ;; system) list_files_in_directory -type d -mindepth 1 -maxdepth 1 ${themedir} ;; *) help_boot_theme return 1 ;; esac } set_boot_theme() { local theme="$1" local themedir="${MROOT}@@SYSCONFDIR@@/splash/themes" [[ -z ${theme} ]] && help_boot_theme && return 1 if [[ -d ${themedir}/${theme} ]] then ln -snf ${theme} ${themedir}/default mecho "Selected theme '${theme}'." else eecho "Theme '${theme}' not available on this system. Aborted!" fi }