Magellan Linux

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

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

revision 1274 by niro, Fri Jan 28 19:39:02 2011 UTC revision 1275 by niro, Fri Feb 4 21:30:04 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 28  rc_init() Line 31  rc_init()
31   -f ${SPLASH_FIFO} \   -f ${SPLASH_FIFO} \
32   ${SPLASH_OPTS} &   ${SPLASH_OPTS} &
33    
34     wait_for_fbsplash
35   splash_control "write:${SPLASH_BOOT_MESSAGE}"   splash_control "write:${SPLASH_BOOT_MESSAGE}"
36   fi   fi
37    
# Line 39  rc_init() Line 43  rc_init()
43   -f ${SPLASH_FIFO} \   -f ${SPLASH_FIFO} \
44   ${SPLASH_OPTS} &   ${SPLASH_OPTS} &
45    
46     wait_for_fbsplash
47   splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}"   splash_control "write:${SPLASH_SHUTDOWN_MESSAGE}"
48   fi   fi
49    
# Line 50  rc_init() Line 55  rc_init()
55   -f ${SPLASH_FIFO} \   -f ${SPLASH_FIFO} \
56   ${SPLASH_OPTS} &   ${SPLASH_OPTS} &
57    
58     wait_for_fbsplash
59   splash_control "write:${SPLASH_REBOOT_MESSAGE}"   splash_control "write:${SPLASH_REBOOT_MESSAGE}"
60   fi   fi
61   fi   fi
# Line 70  splash_resolution() Line 76  splash_resolution()
76   fbres   fbres
77  }  }
78    
79    wait_for_fbsplash()
80    {
81     while [[ -z $(pidof fbsplash) ]]
82     do
83     sleep 0.1
84     done
85    }
86    
87  splash_control()  splash_control()
88  {  {
89   # 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 91  splash_control()
91   if [[ -n $(pidof fbsplash) ]]   if [[ -n $(pidof fbsplash) ]]
92   then   then
93   echo "$@" > ${SPLASH_FIFO}   echo "$@" > ${SPLASH_FIFO}
94     else
95     # exit here
96     splash_cursor enable
97     chvt 1
98   fi   fi
99  }  }
100    

Legend:
Removed from v.1274  
changed lines
  Added in v.1275