5 |
|
|
6 |
splash() |
splash() |
7 |
{ |
{ |
8 |
|
local cmd |
9 |
|
local args |
10 |
|
|
11 |
|
# check for a framebuffer console first! |
12 |
|
[[ ! -e /dev/fb0 ]] && return 0 |
13 |
|
# proc must be mounted too |
14 |
|
[[ ! -e /proc/cmdline ]] && return 0 |
15 |
# only run fbsplash if theme was found |
# only run fbsplash if theme was found |
16 |
[[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME} ]] && return |
[[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME} ]] && return |
17 |
|
# and run only if a config for the current resolution exist |
18 |
|
[[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME}/$(splash_resolution).conf ]] && return |
19 |
|
|
20 |
|
# create fifo if not exist |
21 |
|
if [[ ! -w ${SPLASH_FIFO} ]] |
22 |
|
then |
23 |
|
mkfifo ${SPLASH_FIFO} |
24 |
|
fi |
25 |
|
|
26 |
|
# check cmdline for config_opts |
27 |
|
# splash=silent,theme:mcore |
28 |
|
for cmd in $(< /proc/cmdline) |
29 |
|
do |
30 |
|
case "${cmd}" in |
31 |
|
splash=*) |
32 |
|
# split the cmd and put everything into an array |
33 |
|
args=( $(echo "${cmd}" | sed 's:[,\:=]:\ :g') ) |
34 |
|
# mode is always args[1] |
35 |
|
SPLASH_MODE="${args[1]}" |
36 |
|
# theme is always args[3] |
37 |
|
SPLASH_THEME="${args[3]}" |
38 |
|
;; |
39 |
|
esac |
40 |
|
done |
41 |
|
|
42 |
case $1 in |
case $1 in |
43 |
rc_init) rc_init ;; |
rc_init) rc_init ;; |