10redhat-i18n: Fix handling of kbd maps which are a symlink

Some keyboard maps are symlinks to others, we were not handling this
properly, this patch fixes this.
master
Hans de Goede 2009-07-14 14:42:50 +02:00 committed by Harald Hoyer
parent da1c03c8a0
commit 3d2a316013
1 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,14 @@ if [[ -f /etc/sysconfig/keyboard || -f /etc/sysconfig/console/default.kmap ]]; t
findkeymap $KEYMAP

for FN in $KEYMAPS; do
if [ -L $FN ]; then
TARGET=$(readlink -f $FN)
TG=$(echo $TARGET | sed -e 's/\.gz$//' -e 's/\.bz2$//')
LN=$(echo $FN | sed -e 's/\.gz$//' -e 's/\.bz2$//')
mkdir -p "$initdir/$(dirname $LN)"
ln -s "$TG" "$initdir/$LN"
FN=$TARGET
fi
inst $FN
case $FN in
*.gz) gzip -d "$initdir$FN" ;;