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 1277 by niro, Fri Feb 4 21:34:23 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 61  rc_exit() Line 68  rc_exit()
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    
# Line 70  splash_resolution() Line 82  splash_resolution()
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
# Line 77  splash_control() Line 97  splash_control()
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    

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