diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-03-24 17:23:42 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-03-24 17:23:42 +0100 |
commit | 7e86828338eac262286d659cbcd4c90ff770d7b1 (patch) | |
tree | f043875171f22f4732e3d62799040cd4f874d1e6 | |
parent | 47e916265c38c081f7864fb34aa21762c64ad0d8 (diff) | |
parent | 30cd47881b6be82df05a1393acc1e9112fb9935f (diff) | |
download | runit-void-7e86828338eac262286d659cbcd4c90ff770d7b1.tar.gz runit-void-7e86828338eac262286d659cbcd4c90ff770d7b1.tar.xz runit-void-7e86828338eac262286d659cbcd4c90ff770d7b1.zip |
Merge pull request #23 from nmeum/ttys
Add an additional variable to rc.conf for TTYs
-rw-r--r-- | core-services/02-console-setup.sh | 9 | ||||
-rw-r--r-- | rc.conf | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core-services/02-console-setup.sh b/core-services/02-console-setup.sh index f1a4afc..5c8d468 100644 --- a/core-services/02-console-setup.sh +++ b/core-services/02-console-setup.sh @@ -2,10 +2,15 @@ [ -n "$VIRTUALIZATION" ] && return 0 +TTYS=${TTYS:-12} if [ -n "$FONT" ]; then msg "Setting up TTYs font to '${FONT}'..." - for i in /dev/tty[0-6]; do - setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} $FONT -C $i + + _index=0 + while [ ${_index} -le $TTYS ]; do + setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} \ + $FONT -C "/dev/tty${_index}" + _index=$((_index + 1)) done fi diff --git a/rc.conf b/rc.conf index 49c29fb..2be64f9 100644 --- a/rc.conf +++ b/rc.conf @@ -25,6 +25,9 @@ # Font unimap to load, see setfont(8). #FONT_UNIMAP= +# Amount of ttys which should be setup. +#TTYS= + # Kernel modules to load, delimited by blanks. # # NOTE: it's preferred to declare the modules in /etc/modules-load.d instead: |