Magellan Linux

Diff of /trunk/busybox/splash-functions.rc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/busybox/splash-funtions.rc revision 1264 by niro, Fri Jan 28 19:08:48 2011 UTC trunk/busybox/splash-functions.rc revision 1276 by niro, Fri Feb 4 21:31:22 2011 UTC
# Line 5  Line 5 
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 ;;
# Line 19  rc_init() Line 22  rc_init()
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
# Line 28  rc_init() Line 32  rc_init()
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    
# Line 39  rc_init() Line 44  rc_init()
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    
# Line 50  rc_init() Line 56  rc_init()
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
# Line 70  splash_resolution() Line 77  splash_resolution()
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
# Line 77  splash_control() Line 92  splash_control()
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    

Legend:
Removed from v.1264  
changed lines
  Added in v.1276