aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-10-19 19:44:16 +0000
committerBill Nottingham <notting@redhat.com>2006-10-19 19:44:16 +0000
commitdb147bb0ed160708501ffae23eaf896da0dc7b91 (patch)
tree4337c2bb2d6edd8d5d32c76b6b1945f5817f9eb5
parentf87c918914e0a482670d76f17ba94803ccb191bb (diff)
downloadinitscripts-r8-31-6.tar
initscripts-r8-31-6.tar.gz
initscripts-r8-31-6.tar.bz2
initscripts-r8-31-6.tar.xz
initscripts-r8-31-6.zip
backport some fixesr8-31-6
-rw-r--r--initscripts.spec8
-rwxr-xr-xlang.csh21
-rwxr-xr-xlang.sh15
-rwxr-xr-xrc.d/init.d/functions2
-rwxr-xr-xrc.d/rc.sysinit14
-rwxr-xr-xsetsysfont19
6 files changed, 54 insertions, 25 deletions
diff --git a/initscripts.spec b/initscripts.spec
index ebca14e2..4810d5b3 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: The inittab file and the /etc/init.d scripts.
Name: initscripts
-Version: 8.31.5
+Version: 8.31.6
License: GPL
Group: System Environment/Base
Release: 1
@@ -209,6 +209,12 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/run/utmp
%changelog
+* Thu Oct 19 2006 Bill Nottingham <notting@redhat.com> 8.31.6-1
+- Backport locale fixes from HEAD:
+ - handle non-UTF-8 locales correctly (#209423, #167363, #200100)
+ - runsetsysfont, loadkeys always when /dev/tty{0,1} exist (#150769)
+- rc.sysinit: catch more dmraid errors (#200683)
+
* Fri Jul 7 2006 Bill Nottingham <notting@redhat.com> 8.31.5-1
- backport cups startup fix (#189168)
diff --git a/lang.csh b/lang.csh
index 1b26d902..4c815d30 100755
--- a/lang.csh
+++ b/lang.csh
@@ -25,6 +25,8 @@ if ($sourced == 1) then
unsetenv LC_ALL
endif
endif
+
+ set consoletype=`/sbin/consoletype`
if ($?CHARSET) then
switch ($CHARSET)
@@ -36,7 +38,7 @@ if ($sourced == 1) then
case latin2*:
if ( $?TERM ) then
if ( "$TERM" == "linux" ) then
- if ( `/sbin/consoletype` == "vt" ) then
+ if ( "$consoletype" == "vt" ) then
/bin/echo -n -e '\033(K' >/dev/tty
endif
endif
@@ -54,7 +56,7 @@ if ($sourced == 1) then
case latin2-ucw*:
if ( $?TERM ) then
if ( "$TERM" == "linux" ) then
- if ( `/sbin/consoletype` == "vt" ) then
+ if ( "$consoletype" == "vt" ) then
/bin/echo -n -e '\033(K' > /dev/tty
endif
endif
@@ -68,7 +70,7 @@ if ($sourced == 1) then
case *.UTF-8*:
if ( $?TERM ) then
if ( "$TERM" == "linux" ) then
- if ( `/sbin/consoletype` == "vt" ) then
+ if ( "$consoletype" == "vt" ) then
if ( -x /bin/unicode_start ) then
if { /sbin/consoletype fg } then
if ( $?SYSFONT ) then
@@ -84,6 +86,19 @@ if ($sourced == 1) then
endif
endif
breaksw
+ case *:
+ if ( $?TERM ) then
+ if ( "$TERM" == "linux" ) then
+ if ( "$consoletype" == "vt" ) then
+ if ( -x /bin/unicode_stop ) then
+ if { /sbin/consoletype fg } then
+ /bin/unicode_stop
+ endif
+ endif
+ endif
+ endif
+ endif
+ breaksw
endsw
endif
unsetenv SYSFONTACM
diff --git a/lang.sh b/lang.sh
index 6b186ce6..19bf9158 100755
--- a/lang.sh
+++ b/lang.sh
@@ -40,11 +40,13 @@ if [ "$sourced" = 1 ]; then
[ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
[ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
[ -n "$_XKB_CHARSET" ] && export _XKB_CHARSET || unset _XKB_CHARSET
+
+ consoletype=$(/sbin/consoletype)
if [ -n "$CHARSET" ]; then
case $CHARSET in
8859-1|8859-2|8859-5|8859-15|koi*)
- if [ "$TERM" = "linux" -a "`/sbin/consoletype`" = "vt" ]; then
+ if [ "$TERM" = "linux" -a "$consoletype" = "vt" ]; then
echo -n -e '\033(K' 2>/dev/null > /proc/$$/fd/0
fi
;;
@@ -52,7 +54,7 @@ if [ "$sourced" = 1 ]; then
elif [ -n "$SYSFONTACM" ]; then
case $SYSFONTACM in
iso01*|iso02*|iso05*|iso15*|koi*|latin2-ucw*)
- if [ "$TERM" = "linux" -a "`/sbin/consoletype`" = "vt" ]; then
+ if [ "$TERM" = "linux" -a "$consoletype" = "vt" ]; then
echo -n -e '\033(K' 2>/dev/null > /proc/$$/fd/0
fi
;;
@@ -62,11 +64,18 @@ if [ "$sourced" = 1 ]; then
case $LANG in
*.utf8*|*.UTF-8*)
if [ "$TERM" = "linux" ]; then
- if [ "`/sbin/consoletype`" = "vt" ]; then
+ if [ "$consoletype" = "vt" ]; then
[ -x /bin/unicode_start ] && /sbin/consoletype fg && /bin/unicode_start $SYSFONT $SYSFONTACM
fi
fi
;;
+ *)
+ if [ "$TERM" = "linux" ]; then
+ if [ "$consoletype" = "vt" ]; then
+ [ -x /bin/unicode_stop ] && /sbin/consoletype fg && /bin/unicode_stop
+ fi
+ fi
+ ;;
esac
fi
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 3db40360..45a2bc10 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -493,7 +493,7 @@ resolve_dm_name() {
(
name="$1"
- line=$(/sbin/dmraid -ay -t --ignorelocking | egrep -iv "no block devices found|No RAID disks" | awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}")
+ line=$(/sbin/dmraid -ay -t --ignorelocking | egrep -iv "^[nN]o " | awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}")
newline=$line
for x in $line ; do
if [[ "$x" =~ "^/dev/" ]] ; then
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 7ec7a4fe..6e6c028f 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -77,8 +77,8 @@ relabel_selinux() {
fi
}
-if [ "$CONSOLETYPE" = "vt" -a -x /sbin/setsysfont ]; then
- /sbin/setsysfont
+if [ -x /sbin/setsysfont -a -c /dev/tty1 ]; then
+ /sbin/setsysfont < /dev/tty1 > /dev/tty1 2>/dev/null
fi
# Print a text banner.
@@ -193,7 +193,7 @@ fi
update_boot_stage RCkernelparam
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
-if [ "$CONSOLETYPE" = "vt" -a -x /bin/loadkeys ]; then
+if [ -x /bin/loadkeys ]; then
KEYTABLE=
KEYMAP=
if [ -f /etc/sysconfig/console/default.kmap ]; then
@@ -212,7 +212,11 @@ if [ "$CONSOLETYPE" = "vt" -a -x /bin/loadkeys ]; then
else
echo -n $"Loading default keymap: "
fi
- loadkeys -u $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \
+ LOADKEYS=loadkeys
+ if [ "${LANG}" != "${LANG%%.UTF-8}" -o "${LANG}" != "${LANG%%.utf8}" ]; then
+ LOADKEYS="loadkeys -u"
+ fi
+ $LOADKEYS $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \
success $"Loading default keymap" || failure $"Loading default keymap"
echo
fi
@@ -260,7 +264,7 @@ if [ -c /dev/mapper/control ]; then
if [ -x /sbin/dmraid ]; then
modprobe dm-mirror >/dev/null 2>&1
- for x in $(/sbin/dmraid -ay -t --ignorelocking 2>/dev/null | egrep -iv "no block devices found|No RAID disks" | awk -F ':' '{ print $1 }') ; do
+ for x in $(/sbin/dmraid -ay -t --ignorelocking 2>/dev/null | egrep -iv "^[nN]o " | awk -F ':' '{ print $1 }') ; do
dmname=$(resolve_dm_name $x)
if [ -z "$dmname" ]; then
/sbin/dmraid -ay --ignorelocking "$x"
diff --git a/setsysfont b/setsysfont
index ac1a67dd..29d4506c 100755
--- a/setsysfont
+++ b/setsysfont
@@ -12,20 +12,15 @@ case "$LANG" in
exec unicode_start $SYSFONT $SYSFONTACM
fi
;;
+ *)
+ if /sbin/consoletype fg ; then
+ # no exec, unicode_stop does not set a font
+ unicode_stop
+ fi
+ ;;
esac
-if [ -x /bin/consolechars -o -x /usr/bin/consolechars ]; then
- if [ -n "$SYSFONT" ]; then
- ARGS=$SYSFONT
- if [ -n "$UNIMAP" ]; then
- ARGS="$ARGS --sfm $UNIMAP"
- fi
- if [ -n "$SYSFONTACM" ]; then
- ARGS="$ARGS --acm $SYSFONTACM"
- fi
- consolechars -f $ARGS
- fi
-elif [ -x /bin/setfont ]; then
+if [ -x /bin/setfont ]; then
if [ -n "$UNIMAP" ]; then
ARGS="-u $UNIMAP"
fi