aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorRoman Kyrylych <roman@archlinux.org>2007-11-09 16:47:44 +0200
committerThomas Bächler <thomas@archlinux.org>2007-11-09 16:08:59 +0100
commit57879c6d6c51918b8106142e70643b53a9a8c7da (patch)
tree5ee8ef4241b1e14b3460562a7ff48ed9f82ace4a /rc.sysinit
parent9af6022b841c84283a061d6a7a5be943057ac3ae (diff)
downloadinitscripts-57879c6d6c51918b8106142e70643b53a9a8c7da.tar.xz
Improve error handling and allow multiple keymaps to be loaded
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit28
1 files changed, 14 insertions, 14 deletions
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