From: Hans de Goede Date: Tue, 14 Jul 2009 12:42:50 +0000 (+0200) Subject: 10redhat-i18n: Fix handling of kbd maps which are a symlink X-Git-Tag: 0.5~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d2a3160130a30a5ab0c112a3e94ca173fb5e09c;p=platform%2Fupstream%2Fdracut.git 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. --- diff --git a/modules.d/10redhat-i18n/install b/modules.d/10redhat-i18n/install index 3658193..a6dbc07 100755 --- a/modules.d/10redhat-i18n/install +++ b/modules.d/10redhat-i18n/install @@ -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" ;;