]>
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 | |
23 | start|restart) | |
24 | . /etc/sysconfig/console | |
25 | ||
666d6127 | 26 | if [ -n "$SVGATEXTMODE" ] |
312ff808 | 27 | then |
666d6127 | 28 | run_cmd "Setting Text Mode $SVGATEXTMODE" SVGATextMode $SVGATEXTMODE |
312ff808 | 29 | fi |
4bb70e8b | 30 | if [ -n "$FBSET" ] |
31 | then | |
32 | run_cmd "Setting Text Mode $FBSET" fbset -a $FBSET | |
33 | fi | |
666d6127 | 34 | if [ -n "$CONSOLEFONT" ] |
312ff808 | 35 | then |
666d6127 | 36 | run_cmd "Loading console font and map" consolechars -m ${CONSOLEMAP:-trivial.trans} -f $CONSOLEFONT |
312ff808 | 37 | # Don't use "" here because additional options may be |
38 | # specified after the font name (e.g. fallback tables) | |
39 | fi | |
666d6127 | 40 | if [ -n "$KEYTABLE" ] |
312ff808 | 41 | then |
666d6127 | 42 | run_cmd "Loading keyboard table" loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0 |
312ff808 | 43 | fi |
44 | ;; | |
45 | stop) | |
46 | # Nothing to stop | |
47 | ;; | |
48 | status) | |
49 | # Nothing to report | |
50 | ;; | |
51 | *) | |
666d6127 | 52 | msg_usage "$0 {start|stop|status|restart}" |
312ff808 | 53 | exit 1 |
54 | esac | |
55 | ||
56 | exit 0 |