summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrc.sysinit22
1 files changed, 11 insertions, 11 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 777ffe9..298f446 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -358,9 +358,9 @@ if echo "$LOCALE" | /bin/grep -qi utf ; then
# UTF-8 consoles are default since 2.6.24 kernel
# this code is needed not only for older kernels,
# but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
- for i in $(/usr/bin/seq 0 63); do
- /usr/bin/kbd_mode -u < /dev/tty${i}
- printf "\e%%G" > /dev/tty${i}
+ for i in /dev/tty[0-9]*; do
+ /usr/bin/kbd_mode -u < ${i}
+ printf "\e%%G" > ${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%G"; fi' >>/etc/profile.d/locale.sh
@@ -369,9 +369,9 @@ if echo "$LOCALE" | /bin/grep -qi utf ; then
else
stat_busy "Setting Consoles to legacy mode"
# make non-UTF-8 consoles work on 2.6.24 and newer kernels
- for i in $(/usr/bin/seq 0 63); do
- /usr/bin/kbd_mode -a < /dev/tty${i}
- printf "\e%%@" > /dev/tty${i}
+ for i in /dev/tty[0-9]*; do
+ /usr/bin/kbd_mode -a < ${i}
+ printf "\e%%@" > ${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%@"; fi' >>/etc/profile.d/locale.sh
@@ -385,18 +385,18 @@ if [ -n "$CONSOLEFONT" ]; then
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
CONSOLEMAP=""
fi
- for i in $(/usr/bin/seq 0 63); do
+ for i in /dev/tty[0-9]*; do
if [ -n "$CONSOLEMAP" ]; then
- /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/tty${i} >/dev/null 2>&1
+ /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1
else
- /usr/bin/setfont $CONSOLEFONT -C /dev/tty${i} >/dev/null 2>&1
+ /usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1
fi
done
if [ $? -ne 0 ]; then
stat_fail
else
- for i in $(/usr/bin/seq 0 63); do
- printf "\e(K" > /dev/tty${i}
+ for i in /dev/tty[0-9]*; do
+ printf "\e(K" > ${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh