Changeset 735 in MondoRescue
- Timestamp:
- Aug 3, 2006, 12:30:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/mindi
r718 r735 230 230 [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 2160, approx.)" 231 231 if [ -e "$bigdir/$mappath" ] ; then 232 echo "$mappath already added" >> $LOGFILE233 return232 echo "$mappath already added" >> $LOGFILE 233 return 234 234 elif [ -d "$bigdir/$mappath" ] ; then 235 235 echo "Cannot add $mappath: it's a directory. Sorry." … … 244 244 fi 245 245 else 246 echo -en "`basename $mappath | tr '.' '#' | sed s/#kmap#gz// | sed s/#inc#gz//` " | tr '#' '.'246 echo -en "`basename $mappath | tr '.' '#' | sed s/#kmap#gz// | sed s/#inc#gz//` " | tr '#' '.' 247 247 fi 248 248 … … 555 555 [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share 556 556 if [ ! -e "$KEYDIR" ] ; then 557 LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n"558 return 0557 LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n" 558 return 0 559 559 fi 560 560 if [ -e "/etc/sysconfig/keyboard" ] ; then 561 echo "Red Hat-style config detected." >> $LOGFILE562 keyfile=/etc/sysconfig/keyboard561 echo "Red Hat-style config detected." >> $LOGFILE 562 keyfile=/etc/sysconfig/keyboard 563 563 elif [ -e "/etc/rc.d/rc.keymap" ] ; then 564 echo "Slackware-style config detected." >> $LOGFILE565 keyfile=/etc/rc.d/rc.keymap564 echo "Slackware-style config detected." >> $LOGFILE 565 keyfile=/etc/rc.d/rc.keymap 566 566 elif [ -e "/etc/rc.config" ] ; then 567 567 echo "Debian-style config detected." >> $LOGFILE 568 keyfile=/etc/rc.config568 keyfile=/etc/rc.config 569 569 elif [ -e "/etc/console/boottime.kmap.gz" ] ; then 570 570 echo "Debian-style config detected." >> $LOGFILE 571 echo -en "Adding the following keyboard mapping tables: "572 mkdir -p $bigdir/tmp573 echo "/etc/console/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE574 KBDEPTH=0575 mkdir -p $bigdir/etc/console576 cp /etc/console/boottime.kmap.gz $bigdir/etc/console577 echo -e "$DONE"578 return 0579 else 580 echo -en "Searching for rc.config ..."581 keyfile=`find /etc -name rc.config | head -n1`582 if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then583 LogIt "Unknown config detected. Default keyboard map will be used.\n"584 return585 else586 echo "Found $keyfile" >> $LOGFILE587 fi571 echo -en "Adding the following keyboard mapping tables: " 572 mkdir -p $bigdir/tmp 573 echo "/etc/console/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE 574 KBDEPTH=0 575 mkdir -p $bigdir/etc/console 576 cp /etc/console/boottime.kmap.gz $bigdir/etc/console 577 echo -e "$DONE" 578 return 0 579 else 580 echo -en "Searching for rc.config ..." 581 keyfile=`find /etc -name rc.config | head -n1` 582 if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then 583 LogIt "Unknown config detected. Default keyboard map will be used.\n" 584 return 585 else 586 echo "Found $keyfile" >> $LOGFILE 587 fi 588 588 fi 589 589 if [ ! -e "$KEYDIR/keymaps" ] ; then … … 595 595 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 596 596 echo "locale=$locale" >> $LOGFILE 597 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F " ${locale}." | grep -vx " *#.*"`597 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "/${locale}." | grep -vx " *#.*"` 598 598 [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"` 599 # If we have multiple keymaps then log it !! 600 echo "$mp" | grep -q " " 601 if [ $? -eq 0 ]; then 602 echo "WARNING: Multiple keymaps found: $mp" | tee -a $LOGFILE 603 echo "The following one will be used" >> $LOGFILE 604 fi 599 605 for i in $mp ; do 600 606 mappath=$i … … 606 612 echo "mappath = $mappath" >> $LOGFILE 607 613 if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then 608 LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n"609 return614 LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n" 615 return 610 616 fi 611 617 echo -en "Adding the following keyboard mapping tables: "
Note:
See TracChangeset
for help on using the changeset viewer.