5 |
|
|
6 |
splash() |
splash() |
7 |
{ |
{ |
8 |
|
# only run fbsplash if theme was found |
9 |
|
[[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME} ]] && return |
10 |
|
|
11 |
case $1 in |
case $1 in |
12 |
rc_init) rc_init ;; |
rc_init) rc_init ;; |
13 |
rc_verbose|rc_exit) rc_exit ;; |
rc_verbose|rc_exit) rc_exit ;; |
22 |
|
|
23 |
splash_cursor disable |
splash_cursor disable |
24 |
chvt ${SPLASH_TTY} |
chvt ${SPLASH_TTY} |
25 |
|
sleep 0.5 |
26 |
|
|
27 |
if [[ $runlevel = boot ]] || [[ ${runlevel} = sysinit ]] |
if [[ $runlevel = boot ]] || [[ ${runlevel} = sysinit ]] |
28 |
then |
then |
32 |
-f ${SPLASH_FIFO} \ |
-f ${SPLASH_FIFO} \ |
33 |
${SPLASH_OPTS} & |
${SPLASH_OPTS} & |
34 |
|
|
35 |
|
wait_for_fbsplash |
36 |
splash_control "write:${SPLASH_BOOT_MESSAGE}" |
splash_control "write:${SPLASH_BOOT_MESSAGE}" |
37 |
fi |
fi |
38 |
|
|
44 |
-f ${SPLASH_FIFO} \ |
-f ${SPLASH_FIFO} \ |
45 |
${SPLASH_OPTS} & |
${SPLASH_OPTS} & |
46 |
|
|
47 |
|
wait_for_fbsplash |
48 |
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
49 |
fi |
fi |
50 |
|
|
56 |
-f ${SPLASH_FIFO} \ |
-f ${SPLASH_FIFO} \ |
57 |
${SPLASH_OPTS} & |
${SPLASH_OPTS} & |
58 |
|
|
59 |
|
wait_for_fbsplash |
60 |
splash_control "write:${SPLASH_REBOOT_MESSAGE}" |
splash_control "write:${SPLASH_REBOOT_MESSAGE}" |
61 |
fi |
fi |
62 |
fi |
fi |
77 |
fbres |
fbres |
78 |
} |
} |
79 |
|
|
80 |
|
wait_for_fbsplash() |
81 |
|
{ |
82 |
|
while [[ -z $(pidof fbsplash) ]] |
83 |
|
do |
84 |
|
sleep 0.1 |
85 |
|
done |
86 |
|
} |
87 |
|
|
88 |
splash_control() |
splash_control() |
89 |
{ |
{ |
90 |
# only write to fifo if the fbsplash process is runnning |
# only write to fifo if the fbsplash process is runnning |
92 |
if [[ -n $(pidof fbsplash) ]] |
if [[ -n $(pidof fbsplash) ]] |
93 |
then |
then |
94 |
echo "$@" > ${SPLASH_FIFO} |
echo "$@" > ${SPLASH_FIFO} |
95 |
|
else |
96 |
|
# exit here |
97 |
|
splash_cursor enable |
98 |
|
chvt 1 |
99 |
fi |
fi |
100 |
} |
} |
101 |
|
|