From 57879c6d6c51918b8106142e70643b53a9a8c7da Mon Sep 17 00:00:00 2001 From: Roman Kyrylych Date: Fri, 9 Nov 2007 16:47:44 +0200 Subject: Improve error handling and allow multiple keymaps to be loaded Signed-off-by: Roman Kyrylych --- rc.sysinit | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index f4729bf..bad17d2 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -354,13 +354,9 @@ if echo "$LOCALE" | /bin/grep -qi utf ; then # the $CONSOLE check helps us avoid this when running scripts from cron echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh stat_done - stat_busy "Loading Keyboard Map: $KEYMAP in utf-8 mode" - /bin/loadkeys -q -u "$KEYMAP" > /dev/null 2>&1 - stat_done + status "Loading Keyboard Map: $KEYMAP in utf-8 mode" /bin/loadkeys -q -u $KEYMAP else - stat_busy "Loading Keyboard Map: $KEYMAP in legacy mode" - /bin/loadkeys -q "$KEYMAP" > /dev/null 2>&1 - stat_done + status "Loading Keyboard Map: $KEYMAP in legacy mode" /bin/loadkeys -q $KEYMAP fi if [ -n "$CONSOLEFONT" ]; then @@ -371,17 +367,21 @@ if [ -n "$CONSOLEFONT" ]; then fi for i in $(seq 1 63); do if [ -n "$CONSOLEMAP" ]; then - /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} + /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1 else - /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} + /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1 fi done - for i in $(seq 1 63); do - echo -ne "\e(K" > /dev/vc/${i} - done - # the $CONSOLE check helps us avoid this when running scripts from cron - echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e(K"; fi' >>/etc/profile.d/locale.sh - stat_done + if [ $? -ne 0 ]; then + stat_fail + else + for i in $(seq 1 63); do + echo -ne "\e(K" > /dev/vc/${i} + done + # the $CONSOLE check helps us avoid this when running scripts from cron + echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e(K"; fi' >>/etc/profile.d/locale.sh + stat_done + fi fi # Adding persistent network/cdrom generated rules -- cgit v1.2.3-54-g00ecf