]>
Commit | Line | Data |
---|---|---|
c60a1b24 | 1 | #!/bin/sh |
312ff808 | 2 | # |
3 | # console Load console font and keyboard table | |
4 | # | |
17d1285d | 5 | # chkconfig: 345 70 30 |
312ff808 | 6 | # |
17d1285d JR |
7 | # description: Loads the console font, the application-charset map \ |
8 | # and the keyboard table. | |
312ff808 | 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 | |
88e6841e | 23 | start|restart|reload|force-reload) |
c014112a | 24 | . /etc/sysconfig/console |
312ff808 | 25 | |
88e6841e | 26 | if [ -n "$SVGATEXTMODE" ]; then |
c014112a | 27 | run_cmd "$(nls 'Setting Text Mode') $SVGATEXTMODE" SVGATextMode $SVGATEXTMODE |
28 | fi | |
88e6841e | 29 | if [ -n "$FBSET" ]; then |
c014112a | 30 | run_cmd "$(nls 'Setting Text Mode') $FBSET" fbset -a $FBSET |
31 | fi | |
88e6841e | 32 | if [ -n "$CONSOLEFONT" ]; then |
c014112a | 33 | run_cmd "Loading console font and map" consolechars -m ${CONSOLEMAP:-trivial.trans} -f $CONSOLEFONT |
34 | # Don't use "" here because additional options may be | |
35 | # specified after the font name (e.g. fallback tables) | |
36 | fi | |
88e6841e | 37 | if [ -n "$KEYTABLE" ]; then |
c014112a | 38 | run_cmd "Loading keyboard table" loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0 |
39 | fi | |
40 | ;; | |
41 | stop|status) | |
42 | # Nothing to stop and/or report | |
43 | ;; | |
44 | *) | |
88e6841e | 45 | msg_usage "$0 {start|stop|restart|reload|force-reload|status}" |
46 | exit 3 | |
312ff808 | 47 | esac |
48 | ||
49 | exit 0 |