42 |
case $1 in |
case $1 in |
43 |
rc_init) rc_init ;; |
rc_init) rc_init ;; |
44 |
rc_verbose|rc_exit) rc_exit ;; |
rc_verbose|rc_exit) rc_exit ;; |
45 |
|
# redraw splash image and text |
46 |
|
svc_started) |
47 |
|
if [[ ${runlevel} = boot ]] || [[ ${runlevel} = sysinit ]] |
48 |
|
then |
49 |
|
splash_control "image:" |
50 |
|
splash_control "write:${SPLASH_BOOT_MESSAGE}" |
51 |
|
fi |
52 |
|
;; |
53 |
|
svc_stopped) |
54 |
|
if [[ ${runlevel} = shutdown ]] |
55 |
|
then |
56 |
|
splash_control "image:" |
57 |
|
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
58 |
|
fi |
59 |
|
if [[ ${runlevel} = reboot ]] |
60 |
|
then |
61 |
|
splash_control "image:" |
62 |
|
splash_control "write:${SPLASH_REBOOT_MESSAGE}" |
63 |
|
fi |
64 |
|
;; |
65 |
esac |
esac |
66 |
} |
} |
67 |
|
|
71 |
then |
then |
72 |
local resolution="$(splash_resolution)" |
local resolution="$(splash_resolution)" |
73 |
|
|
|
splash_cursor disable |
|
74 |
chvt ${SPLASH_TTY} |
chvt ${SPLASH_TTY} |
75 |
sleep 0.5 |
sleep 0.5 |
76 |
|
|
77 |
if [[ $runlevel = boot ]] || [[ ${runlevel} = sysinit ]] |
if [[ ${runlevel} = boot ]] || [[ ${runlevel} = sysinit ]] |
78 |
then |
then |
79 |
fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ |
fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ |
80 |
-s ${SPLASH_THEMES}/${SPLASH_THEME}/startup-${resolution}.ppm.gz \ |
-s ${SPLASH_THEMES}/${SPLASH_THEME}/startup-${resolution}.ppm.gz \ |
98 |
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}" |
99 |
fi |
fi |
100 |
|
|
101 |
if [[ $runlevel = reboot ]] |
if [[ ${runlevel} = reboot ]] |
102 |
then |
then |
103 |
fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ |
fbsplash -i ${SPLASH_THEMES}/${SPLASH_THEME}/${resolution}.conf \ |
104 |
-s ${SPLASH_THEMES}/${SPLASH_THEME}/reboot-${resolution}.ppm.gz \ |
-s ${SPLASH_THEMES}/${SPLASH_THEME}/reboot-${resolution}.ppm.gz \ |
117 |
if [[ ${SPLASH_MODE} = silent ]] |
if [[ ${SPLASH_MODE} = silent ]] |
118 |
then |
then |
119 |
splash_control "exit" |
splash_control "exit" |
|
splash_cursor enable |
|
120 |
if [[ -n ${SPLASH_X11_TTY} ]] |
if [[ -n ${SPLASH_X11_TTY} ]] |
121 |
then |
then |
122 |
chvt ${SPLASH_X11_TTY} |
chvt ${SPLASH_X11_TTY} |
146 |
if [[ -n $(pidof fbsplash) ]] |
if [[ -n $(pidof fbsplash) ]] |
147 |
then |
then |
148 |
echo "$@" > ${SPLASH_FIFO} |
echo "$@" > ${SPLASH_FIFO} |
|
else |
|
|
# exit here |
|
|
splash_cursor enable |
|
|
chvt 1 |
|
149 |
fi |
fi |
150 |
} |
} |
|
|
|
|
# disable|enable |
|
|
splash_cursor() |
|
|
{ |
|
|
case $1 in |
|
|
enable) echo -e "\e[?0c";; |
|
|
disable) echo -e "\e[?1c" ;; |
|
|
esac |
|
|
} |
|