Magellan Linux

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

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

revision 1277 by niro, Fri Feb 4 21:34:23 2011 UTC revision 1279 by niro, Sun Feb 6 22:32:23 2011 UTC
# Line 5  Line 5 
5    
6  splash()  splash()
7  {  {
8     local cmd
9     local args
10    
11     # check for a framebuffer console first!
12     [[ ! -e /dev/fb0 ]] && return 0
13     # proc must be mounted too
14     [[ ! -e /proc/cmdline ]] && return 0
15   # only run fbsplash if theme was found   # only run fbsplash if theme was found
16   [[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME} ]] && return   [[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME} ]] && return
17     # and run only if a config for the current resolution exist
18     [[ ! -e ${SPLASH_THEMES}/${SPLASH_THEME}/$(splash_resolution).conf ]] && return
19    
20     # check cmdline for config_opts
21     #   splash=silent,theme:mcore
22     for cmd in $(< /proc/cmdline)
23     do
24     case "${cmd}" in
25     splash=*)
26     # split the cmd and put everything into an array
27     args=( $(echo "${cmd}" | sed 's:[,\:=]:\ :g') )
28     # mode is always args[1]
29     SPLASH_MODE="${args[1]}"
30     # theme is always args[3]
31     SPLASH_THEME="${args[3]}"
32     ;;
33     esac
34     done
35    
36   case $1 in   case $1 in
37   rc_init) rc_init ;;   rc_init) rc_init ;;

Legend:
Removed from v.1277  
changed lines
  Added in v.1279