Magellan Linux

Annotation of /tags/splash-0_1/splashutils-magellan/init-splash

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (hide annotations) (download)
Tue May 3 15:32:41 2005 UTC (19 years ago) by (unknown author)
File size: 2250 byte(s)
This commit was manufactured by cvs2svn to create tag 'splash-0_1'.
1 niro 5 #!/bin/bash
2    
3     #%rlevels: 1:s 2:s 3:s 4:s 5:s
4     #%start: 99
5     #%stop:
6    
7     #deps
8     #%needs:
9     #%before:
10     #%after:
11    
12     source /etc/sysconfig/rc
13     source $rc_functions
14     source /etc/conf.d/splash
15    
16     # default settings
17     test -z "${SPLASH_THEME}" && SPLASH_THEME="default"
18     if [ -z "${SPLASH_TTYS}" ]; then
19     if [ -n "${RC_TTY_NUMBER}" ]; then
20     SPLASH_TTYS=$(seq 0 "${RC_TTY_NUMBER}")
21     else
22     SPLASH_TTYS="0 1 2 3 4 5 6"
23     fi
24     fi
25    
26     # dummy function to handle sourcing of fbconfig file
27     box () { return; }
28    
29     parse_cmdline ()
30     {
31     line=`egrep -o 'splash=[^ ]+' /proc/cmdline`
32     line="${line#splash=}"
33     t="${IFS}"
34     IFS=","
35    
36     for param in ${line}
37     do
38     if [ "${param%:*}" = "theme" ]; then
39     SPLASH_THEME="${param#*:}"
40     else
41     SPLASH_MODE="${param}"
42     fi
43     done
44    
45     IFS="${t}"
46     }
47    
48     case "$1" in
49     start)
50     # only do this if the kernel supports fbsplash
51     if [ -e /dev/fbsplash ] && [ -e /proc/fbsplash ]
52     then
53     echo -e ${COLOREDSTAR}"Setting framebuffer console images"
54     parse_cmdline
55    
56     for TTY in ${SPLASH_TTYS}
57     do
58     theme="${SPLASH_THEME}"
59    
60     if [ "${TTY}" -eq 0 -a -z "$(splash_util -c getstate --vc=0 | grep off)" ]
61     then
62     continue
63     fi
64    
65     if [ -n "${SPLASH_TTY_MAP}" ]
66     then
67     for i in ${SPLASH_TTY_MAP}
68     do
69     if [ "${i%:*}" = "${TTY}" ]
70     then
71     theme="${i#*:}"
72     fi
73     done
74     fi
75    
76     /sbin/splash_util --vc="${TTY}" -m v -t "${theme}" -c setcfg 2>/dev/null
77     [ "${TTY}" -eq 0 ] && /sbin/splash_util --vc=0 -m v -t "${theme}" -c setpic
78     /sbin/splash_util --vc="${TTY}" -c on 2>/dev/null
79     done
80    
81     #to prevent staircase effect
82     source /etc/sysconfig/rc
83     source $rc_functions
84     ${CURS_UP}
85     ${CURS_UP}
86     ${CURS_UP}
87    
88     evaluate_retval
89     fi
90     splash svc_started splash 0
91     ;;
92    
93     stop)
94     if [ -e /dev/fbsplash ] && [ -e /proc/fbsplash ]
95     then
96     echo -e ${COLOREDSTAR}"Removing splash-screens ..."
97     for TTY in ${SPLASH_TTYS}
98     do
99     /sbin/splash_util --vc="${TTY}" --cmd=off
100     done
101     fi
102    
103     #to prevent the flow effect
104     source /etc/sysconfig/rc
105     source $rc_functions
106    
107     evaluate_retval
108     splash svc_stopped splash 0
109     ;;
110    
111     restart)
112     $0 stop
113     sleep 1
114     $0 start
115     ;;
116    
117     *)
118     echo "Usage: $0 {start|stop|restart}"
119     exit 1
120     ;;
121     esac

Properties

Name Value
svn:executable *