Summary: | sys-apps/baselayout: /etc/init.consolefont: only applies font to vts 1-10 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ed Catmur <ed> |
Component: | [OLD] Core system | Assignee: | x86-kernel (DEPRECATED) <x86-kernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Ed Catmur
2004-01-30 03:48:37 UTC
I have had this slight alteration on my box for a long time, with bootsplash, consolefont and numlock init scripts. It's handy, but the problem is that it adds a significant amount of time to the boot process, especially on slower systems. Perhaps another way of doing it would be some /etc/init.d/functions.sh function that parses /etc/inittab, using that to work out how may terminals are likely to exist. IMO inittab won't do the trick. On my system it only mentions vcs 1-6. I use vcs 10 and 11 for logging (and, of course, I want the corrent font to be set on these consoles :)). How big an amount of time are we talking here about? Is it more like 0.5s or more like 5s or perhaps even 50s? It does not mean that if there are 15 tty nodes in /dev, that there are so many consoles, or that the user uses them. I instead made the following change: -- Index: ChangeLog =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/ChangeLog,v retrieving revision 1.318 diff -u -r1.318 ChangeLog --- ChangeLog 9 Feb 2004 18:40:42 -0000 1.318 +++ ChangeLog 15 Feb 2004 19:59:18 -0000 @@ -1,7 +1,13 @@ # ChangeLog for Gentoo Linux System Intialization ("rc") scripts -# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL +# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL # Written by Daniel Robbins (drobbins@gentoo.org) + 15 Feb 2004; Martin Schlemmer <azarah@gentoo.org>: + + Add RC_TTY_NUMBER to /etc/conf.d/rc to configure how many tty devices + are used in scripts such as consolefonts, numlock, etc. This should + close bug #39863. + 09 Feb 2004; Martin Schlemmer <azarah@gentoo.org>: Add SELinux modifications to /sbin/runscript. This allows runscript to Index: etc/conf.d/rc =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/rc,v retrieving revision 1.11 diff -u -r1.11 rc --- etc/conf.d/rc 4 Aug 2003 19:19:40 -0000 1.11 +++ etc/conf.d/rc 15 Feb 2004 19:59:18 -0000 @@ -7,6 +7,12 @@ # NOTE: most of these are not in use yet!! # + +# This is the amount of tty's used in most of the rc-scripts (like +# consolefont, numlock, etc + +RC_TTY_NUMBER=11 + # Set to "yes" if you want the rc system to try and start services # in parallel for slight speed improvement. Index: init.d/consolefont =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/consolefont,v retrieving revision 1.20 diff -u -r1.20 consolefont --- init.d/consolefont 8 Feb 2004 11:07:45 -0000 1.20 +++ init.d/consolefont 15 Feb 2004 19:59:18 -0000 @@ -39,7 +39,7 @@ sf_param="-C " fi - for x in 1 2 3 4 5 6 7 8 9 10 + for x in $(seq 1 "${RC_TTY_NUMBER}") do # Using DEVFS ? if [ -e /dev/.devfsd ] || \ @@ -66,7 +66,7 @@ if [ "${retval}" -eq 0 ] then - for x in 1 2 3 4 5 6 7 8 9 10 + for x in $(seq 1 "${RC_TTY_NUMBER}") do # Using DEVFS ? if [ -e /dev/.devfsd ] || \ Index: init.d/numlock =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/numlock,v retrieving revision 1.8 diff -u -r1.8 numlock --- init.d/numlock 26 Dec 2003 00:25:24 -0000 1.8 +++ init.d/numlock 15 Feb 2004 19:59:18 -0000 @@ -10,7 +10,7 @@ start() { ebegin "Enabling numlock on ttys" - for tty in $(seq 1 11) + for tty in $(seq 1 "${RC_TTY_NUMBER}") do if [ -e /dev/.devfsd ] || \ [ -e /dev/.udev -a -d /dev/vc ] @@ -25,7 +25,7 @@ stop() { ebegin "Disabling numlock on ttys" - for tty in $(seq 1 11) + for tty in $(seq 1 "${RC_TTY_NUMBER}") do if [ -e /dev/.devfsd ] || \ [ -e /dev/.udev -a -d /dev/vc ] Index: sbin/functions.sh =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/sbin/functions.sh,v retrieving revision 1.48 diff -u -r1.48 functions.sh --- sbin/functions.sh 8 Feb 2004 11:42:21 -0000 1.48 +++ sbin/functions.sh 15 Feb 2004 19:59:18 -0000 @@ -34,6 +34,7 @@ # # Default values for rc system # +RC_TTY_NUMBER=11 RC_NET_STRICT_CHECKING="no" RC_PARALLEL_STARTUP="no" RC_USE_CONFIG_PROFILE="yes" |