]>
Commit | Line | Data |
---|---|---|
3bac0e48 | 1 | #!/bin/sh |
2 | # | |
3 | # bootsplash bootsplashed console | |
4 | # | |
5 | # chkconfig: 345 99 99 | |
6 | # | |
7 | # description: Activate bootsplashed consoles | |
8 | # | |
9 | # $Id$ | |
10 | ||
11 | ||
12 | # Source function library | |
13 | . /etc/rc.d/init.d/functions | |
14 | ||
15 | # Set defaults | |
16 | RES=`fbresolution` | |
17 | ||
18 | # Get service config - may override defaults | |
19 | [ -f /etc/sysconfig/bootsplash ] && . /etc/sysconfig/bootsplash | |
20 | ||
21 | # See how we were called. | |
22 | case "$1" in | |
23 | start) | |
24 | # Check if the service is already running? | |
25 | if [ ! -f /var/lock/subsys/bootsplash ]; then | |
26 | ||
27 | for console in $BOOT_SPLASH_CONSOLES; do | |
28 | msg_starting "bootsplash terminal $console" | |
29 | daemon /bin/splash.bin -s -u $console "/etc/bootsplash/themes/$THEME/config/bootsplash-$RES.cfg" | |
30 | done | |
31 | RETVAL=$? | |
32 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bootsplash | |
33 | else | |
34 | msg_already_running bootsplash | |
35 | fi | |
36 | ;; | |
37 | stop) | |
38 | if [ -f /var/lock/subsys/bootsplash ]; then | |
39 | # Stop daemons. | |
40 | msg_stopping bootsplash | |
41 | #killproc bootsplash | |
42 | rm -f /var/lock/subsys/bootsplash | |
43 | else | |
44 | msg_not_running bootsplash | |
45 | fi | |
46 | ;; | |
47 | restart) | |
48 | $0 stop | |
49 | $0 start | |
50 | exit $? | |
51 | ;; | |
52 | *) | |
53 | # show "Usage: %s {start|stop|restart}" | |
54 | msg_usage "$0 {start|stop|restart}" | |
55 | exit 3 | |
56 | esac | |
57 | ||
58 | exit $RETVAL | |
59 | ||
60 | # This must be last line ! | |
61 | # vi:syntax=sh:tw=78:ts=8:sw=4 |