Magellan Linux

Annotation of /trunk/splashutils-magellan/init-splash

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations) (download)
Fri Mar 4 18:29:06 2005 UTC (19 years, 2 months ago) by niro
File size: 2226 byte(s)
updated to gentoo ver-0.1.4

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

Properties

Name Value
svn:executable *