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 |
68 |
then |
then |
69 |
splash_control "exit" |
splash_control "exit" |
70 |
splash_cursor enable |
splash_cursor enable |
71 |
chvt 1 |
if [[ -n ${SPLASH_X11_TTY} ]] |
72 |
|
then |
73 |
|
chvt ${SPLASH_X11_TTY} |
74 |
|
else |
75 |
|
chvt 1 |
76 |
|
fi |
77 |
fi |
fi |
78 |
} |
} |
79 |
|
|
82 |
fbres |
fbres |
83 |
} |
} |
84 |
|
|
85 |
|
wait_for_fbsplash() |
86 |
|
{ |
87 |
|
while [[ -z $(pidof fbsplash) ]] |
88 |
|
do |
89 |
|
sleep 0.1 |
90 |
|
done |
91 |
|
} |
92 |
|
|
93 |
splash_control() |
splash_control() |
94 |
{ |
{ |
95 |
# only write to fifo if the fbsplash process is runnning |
# only write to fifo if the fbsplash process is runnning |
97 |
if [[ -n $(pidof fbsplash) ]] |
if [[ -n $(pidof fbsplash) ]] |
98 |
then |
then |
99 |
echo "$@" > ${SPLASH_FIFO} |
echo "$@" > ${SPLASH_FIFO} |
100 |
|
else |
101 |
|
# exit here |
102 |
|
splash_cursor enable |
103 |
|
chvt 1 |
104 |
fi |
fi |
105 |
} |
} |
106 |
|
|