/[baselayout]/trunk/init.d/consolefont
Gentoo

Contents of /trunk/init.d/consolefont

Parent Directory Parent Directory | Revision Log Revision Log


Revision 345 - (show annotations) (download)
Sun Apr 6 16:28:27 2003 UTC (16 years ago) by azarah
File size: 1560 byte(s)
various fixes; moved .c files to src

1 #!/sbin/runscript
2 # Copyright 1999-2003 Gentoo Technologies, Inc.
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header$
5
6
7 depend() {
8 need localmount
9 }
10
11 start() {
12 local retval=1
13 if [ -n "${CONSOLEFONT}" ]
14 then
15 # Getting additional parameters, ie consoletranslation
16 local param=""
17 local x=""
18 if [ -n "${CONSOLETRANSLATION}" ]
19 then
20 param="-m ${CONSOLETRANSLATION}"
21 fi
22
23 # Actually setting font
24 if [ -x /usr/bin/consolechars ]
25 then
26 #
27 # Console-Tools section:
28 #
29
30 ebegin "Setting user font"
31 for x in 1 2 3 4 5 6 7 8 9 10
32 do
33 # Using DEVFS ?
34 if [ -e /dev/.devfsd ]
35 then
36 /usr/bin/consolechars -f ${CONSOLEFONT} ${param} \
37 --tty=/dev/vc/${x} &>/dev/null
38 retval=$
39 else
40 /usr/bin/consolechars -f ${CONSOLEFONT} ${param} \
41 --tty=/dev/tty${x} &>/dev/null
42 retval=$?
43 fi
44 done
45
46 elif [ -x /usr/bin/setfont ]
47 then
48 #
49 # Kbd Section
50 #
51
52 ebegin "Setting user font"
53 /usr/bin/setfont ${CONSOLEFONT} ${param} >/dev/null
54 retval=$?
55
56 for x in 1 2 3 4 5 6 7 8 9 10
57 do
58 # Using DEVFS ?
59 if [ -e /dev/.devfsd ]
60 then
61 echo -ne "\033(K" > /dev/vc/${x}
62 retval=$?
63 else
64 echo -ne "\033(K" > /dev/tty${x}
65 retval=$?
66 fi
67 done
68
69 else
70 # No console program installed!
71 eend 1 "The setfont/consolechars executable not found"
72 return 1
73 fi
74
75 eend $retval "Failed to set user font"
76 else
77 eerror "You need to setup \$CONSOLEFONT in /etc/rc.conf first."
78 fi
79
80 return $retval
81 }
82
83
84 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20