1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 # Author: Michal Januszewski <spock@gentoo.org>
5 # Maintainer: Michal Januszewski <spock@gentoo.org>
7 # This file is a part of splashutils.
9 # NOTE: The code here has to be compatible with ash and with the busybox
10 # versions of all the standard system utilities. That means: no
11 # extended regular expressions, no pattern substitution in variables,
12 # and no fancy GNU command line options.
18 [ ! -x /sbin/fbcondecor_helper ] && return
19 [ "${SPLASH_MODE_REQ}" != 'silent' ] && return
24 /sbin/fbcondecor_helper 2 'repaint'
29 elif [ "${CDROOT}" -eq '1' ]; then
30 export BOOT_MSG="Preparing the LiveCD environment... Press Alt+F1 for verbose mode."
32 export BOOT_MSG="Preparing the system for boot... Press Alt+F1 for verbose mode."
34 /sbin/fbcondecor_helper 2 'repaint'
37 if [ -x /bin/chvt ]; then
39 elif [ -x /bin/busybox ]; then
47 # If it's already set up, let's not waste time on parsing the config
49 if [ "${SPLASH_THEME}" != '' -a "${SPLASH_TTY}" != '' -a "$1" != 'force' ]; then
53 export SPLASH_MODE_REQ="off"
54 export SPLASH_THEME="default"
55 export SPLASH_TTY="16"
56 export SPLASH_KDMODE="TEXT"
58 if [ -f /proc/cmdline ]; then
59 options=$(sed -e 's/.*splash=\([^ ]*\).*/\1/' -e 's/,/ /g' /proc/cmdline)
61 for i in ${options} ; do
63 theme) SPLASH_THEME=${i#*:} ;;
64 tty) SPLASH_TTY=${i#*:} ;;
65 verbose) SPLASH_MODE_REQ="verbose" ;;
66 silent) SPLASH_MODE_REQ="silent" ;;
67 kdgraphics) SPLASH_KDMODE="GRAPHICS" ;;