diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-03-23 15:49:09 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-03-23 15:49:09 +0100 |
commit | 30cd47881b6be82df05a1393acc1e9112fb9935f (patch) | |
tree | f043875171f22f4732e3d62799040cd4f874d1e6 /core-services | |
parent | 47e916265c38c081f7864fb34aa21762c64ad0d8 (diff) | |
download | runit-void-30cd47881b6be82df05a1393acc1e9112fb9935f.tar.gz runit-void-30cd47881b6be82df05a1393acc1e9112fb9935f.tar.xz runit-void-30cd47881b6be82df05a1393acc1e9112fb9935f.zip |
Add an additional variable for ttys
Diffstat (limited to 'core-services')
-rw-r--r-- | core-services/02-console-setup.sh | 9 |
1 files changed, 7 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 |