]>
Commit | Line | Data |
---|---|---|
312ff808 | 1 | #!/bin/bash |
2 | # | |
3 | # console Load console font and keyboard table | |
4 | # | |
5 | # chkconfig: 345 70 30 | |
6 | # | |
7 | # description: Loads the console font, the application-charset map \ | |
8 | # and the keyboard table. | |
9 | ||
10 | # This must be executed *after* /usr is mounted. | |
11 | # This means is /usr is NFS-mounted, it needs to | |
12 | # run after networking and NFS mounts are up. | |
13 | ||
14 | [ -f /etc/sysconfig/console ] || exit 0 | |
15 | ||
16 | [ -f /usr/bin/consolechars ] || exit 0 | |
17 | [ -f /usr/bin/loadkeys ] || exit 0 | |
18 | ||
19 | # Source function library | |
20 | . /etc/rc.d/init.d/functions | |
21 | ||
22 | case "$1" in | |
23 | start|restart) | |
24 | . /etc/sysconfig/console | |
25 | ||
26 | if [ "$SVGATEXTMODE" != "" ] | |
27 | then | |
28 | SVGATextMode $SVGATEXTMODE | |
29 | fi | |
30 | if [ "$CONSOLEFONT" != "" ] | |
31 | then | |
32 | show Loading console font | |
33 | busy | |
34 | consolechars -f $CONSOLEFONT &>/dev/null | |
35 | deltext;ok | |
36 | # Don't use "" here because additional options may be | |
37 | # specified after the font name (e.g. fallback tables) | |
38 | fi | |
39 | if [ "$CONSOLEMAP" != "" ] | |
40 | then | |
41 | show Loading console map | |
42 | busy | |
43 | consolechars -m $CONSOLEMAP &>/dev/null | |
44 | deltext;ok | |
45 | fi | |
46 | if [ "$KEYTABLE" != "" ] | |
47 | then | |
48 | show Loading keyboard table | |
49 | busy | |
50 | loadkeys $KEYTABLE &>/dev/null | |
51 | deltext;ok | |
52 | fi | |
53 | ;; | |
54 | stop) | |
55 | # Nothing to stop | |
56 | ;; | |
57 | status) | |
58 | # Nothing to report | |
59 | ;; | |
60 | *) | |
61 | echo "Usage: $0 {start|stop|status|restart}" | |
62 | exit 1 | |
63 | esac | |
64 | ||
65 | exit 0 |