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 ;; |
31 |
-f ${SPLASH_FIFO} \ |
-f ${SPLASH_FIFO} \ |
32 |
${SPLASH_OPTS} & |
${SPLASH_OPTS} & |
33 |
|
|
34 |
|
wait_for_fbsplash |
35 |
splash_control "write:${SPLASH_BOOT_MESSAGE}" |
splash_control "write:${SPLASH_BOOT_MESSAGE}" |
36 |
fi |
fi |
37 |
|
|
43 |
-f ${SPLASH_FIFO} \ |
-f ${SPLASH_FIFO} \ |
44 |
${SPLASH_OPTS} & |
${SPLASH_OPTS} & |
45 |
|
|
46 |
|
wait_for_fbsplash |
47 |
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
48 |
fi |
fi |
49 |
|
|
55 |
-f ${SPLASH_FIFO} \ |
-f ${SPLASH_FIFO} \ |
56 |
${SPLASH_OPTS} & |
${SPLASH_OPTS} & |
57 |
|
|
58 |
|
wait_for_fbsplash |
59 |
splash_control "write:${SPLASH_REBOOT_MESSAGE}" |
splash_control "write:${SPLASH_REBOOT_MESSAGE}" |
60 |
fi |
fi |
61 |
fi |
fi |
76 |
fbres |
fbres |
77 |
} |
} |
78 |
|
|
79 |
|
wait_for_fbsplash() |
80 |
|
{ |
81 |
|
while [[ -z $(pidof fbsplash) ]] |
82 |
|
do |
83 |
|
sleep 0.1 |
84 |
|
done |
85 |
|
} |
86 |
|
|
87 |
splash_control() |
splash_control() |
88 |
{ |
{ |
89 |
# only write to fifo if the fbsplash process is runnning |
# only write to fifo if the fbsplash process is runnning |
91 |
if [[ -n $(pidof fbsplash) ]] |
if [[ -n $(pidof fbsplash) ]] |
92 |
then |
then |
93 |
echo "$@" > ${SPLASH_FIFO} |
echo "$@" > ${SPLASH_FIFO} |
94 |
|
else |
95 |
|
# exit here |
96 |
|
splash_cursor enable |
97 |
|
chvt 1 |
98 |
fi |
fi |
99 |
} |
} |
100 |
|
|