source: bootscripts-standard/clfs/init.d/i18n@ e5112de

Last change on this file since e5112de was 9c1acc7, checked in by Jim Gifford <clfs@…>, 16 years ago

i18n script added

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[1f11ff2]1#!/bin/bash
2########################################################################
[9c1acc7]3# Begin $rc_base/init.d/i18n
[1f11ff2]4#
[9c1acc7]5# Description : Setup for i18n
[1f11ff2]6#
7# Authors : Jim Gifford
8#
9# Version : 00.00
10#
[9c1acc7]11# Notes :
[1f11ff2]12#
13########################################################################
14
15. /etc/sysconfig/rc
16. ${rc_functions}
17
[9c1acc7]18if [ -f /etc/sysconfig/i18n ]; then
19 . /etc/sysconfig/i18n
[1f11ff2]20fi
21
22case "${1}" in
23 start)
24 # Set the font
25 #
26 boot_mesg "Setting Font..."
27 if [ "${FONT_TRANSLATION}" ]; then
28 FONTTRANS="-m ${FONT_TRANSLATION}"
29 fi
30 for ttynum in $(seq 1 12) ; do
31 setfont ${FONT} ${FONTTRANS} -C /dev/tty${ttynum}
32 done
33 evaluate_retval
34
35 # Load the keymap in UTF-8
36 #
37 boot_mesg "Setting keymap to UTF-8..."
38 if [ "${DUMPKEYS_CHARSET}" ]; then
39 DUMPKEYS_OPTS="-c ${DUMPKEYS_CHARSET}"
40 fi
41 evaluate_retval
42
43 # Set terminal encoding to UTF-8
44 #
45 if [ "${UNICODE}" = "yes" ] ; then
46 dumpkeys ${DUMPKEYS_OPTS} | loadkeys --unicode
47 TTYENCODE=$'\033%G'
48 TTYMESSAGE=UTF-8
49 else
50 TTYENCODE=$'\033(K'
51 TTYMESSAGE=ASCII
52 fi
53
54 # Enable multibyte input
55 #
56 boot_mesg "Enabling Multibyte input..."
57 kbd_mode -u
58 evaluate_retval
59
60 # Setup Keymaps
61 #
62 if [ "${WINDOWS_KEYBOARD}" = "yes" ]; then
63 WINDOWS_KEYMAP=windowkeys
64 fi
65 loadkeys -q ${WINDOW_KEYMAP} ${KEYMAP} ${EXTENDED_KEYMAPS}
66
67 # Setting up the Terminals
68 #
69 boot_mesg "Setting encoding to ${TTYMESSAGE}.."
70 for ttynum in $(seq 1 12) ; do
71 echo -ne ${TTYENCODE} > /dev/tty${ttynum}
72 done
73 evaluate_retval
74
75 ;;
76
77 *)
78 echo "Usage: ${0} {start}"
79 exit 1
80 ;;
81esac
82
[9c1acc7]83# End $rc_base/init.d/i18n
Note: See TracBrowser for help on using the repository browser.