home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / ubiquity / localechooser / finish-install < prev    next >
Encoding:
Text File  |  2007-04-12  |  2.4 KB  |  88 lines

  1. #! /bin/sh
  2.  
  3. set -e
  4.  
  5. . /usr/share/debconf/confmodule
  6.  
  7. ARCH=`udpkg --print-architecture`
  8.  
  9. modify_cyrconfig() {
  10.     if [ "$2" ]; then
  11.         sed -e "s/^$1 .*\$/$1 $2/" \
  12.             $cyrconfig > $cyrconfig.tmp && \
  13.             mv $cyrconfig.tmp $cyrconfig
  14.     fi
  15. }
  16.  
  17. db_get debian-installer/locale
  18. LOCALE="$RET"
  19.  
  20. # Set locale to C if it has not yet been set
  21. # This can happen during e.g. s390 installs where localechooser is not run
  22. [ -z "$LOCALE" ] && LOCALE="C"
  23.  
  24. LANGUAGE=${LOCALE%%_*}
  25.  
  26. # Install specific packages depending on selected language
  27.  
  28. if [ "$LOCALE" != "C" ] ; then
  29.     # Other language specific packages
  30.     case "$LANGUAGE" in
  31.         ar|he|fa)
  32.         # RTL languages (Arabic, Hebrew, Farsi)
  33.         apt-install libfribidi0 || true
  34.         ;;
  35.     esac
  36. fi
  37.  
  38. # Install localization-config except when no localization happens
  39. # Install it anyway for powerpc (to handle subarches)
  40. # Disabled for etch as l-c is not ready
  41. #if [ "$LOCALE" != "C" ] || [ "$ARCH" = "powerpc" ]; then
  42. #        apt-install localization-config || true
  43. #fi
  44.  
  45.  
  46. db_get debian-installer/consoledisplay || true
  47. consoletype=`echo $RET | sed -e 's/=.*$//'`
  48. case "$consoletype" in
  49.     kbd)
  50.     consolefont=`echo $RET | sed -e 's/^kbd=//'`
  51.     if apt-install console-tools; then
  52.         ctconfig=/target/etc/console-tools/config
  53.         acm=`echo $consolefont | sed -e 's/.*(//' -e 's/).*//'`
  54.         [ "$acm" = utf8 ] && acm=
  55.         # A few workarounds of console-tools limitations below
  56.         # APP_CHARSET_MAP and console fonts are not set
  57.         # for all consoles. These workarounds should probably
  58.         # be removed when we switch to kbd
  59.         if [ -n "$acm" ]; then
  60.             echo "APP_CHARSET_MAP=$acm" >>$ctconfig
  61.             echo "APP_CHARSET_MAP_vc1=$acm" >>$ctconfig
  62.             echo "APP_CHARSET_MAP_vc2=$acm" >>$ctconfig
  63.             echo "APP_CHARSET_MAP_vc3=$acm" >>$ctconfig
  64.             echo "APP_CHARSET_MAP_vc4=$acm" >>$ctconfig
  65.             echo "APP_CHARSET_MAP_vc5=$acm" >>$ctconfig
  66.             echo "APP_CHARSET_MAP_vc6=$acm" >>$ctconfig
  67.         fi
  68.         consolefont=`echo $consolefont | sed -e 's/(.*//'`
  69.         if [ -n "$consolefont" ]; then
  70.             echo "SCREEN_FONT=$consolefont" >>$ctconfig
  71.             echo "SCREEN_FONT_vc2=$consolefont" >>$ctconfig
  72.             echo "SCREEN_FONT_vc3=$consolefont" >>$ctconfig
  73.             echo "SCREEN_FONT_vc4=$consolefont" >>$ctconfig
  74.             echo "SCREEN_FONT_vc5=$consolefont" >>$ctconfig
  75.             echo "SCREEN_FONT_vc6=$consolefont" >>$ctconfig
  76.         fi
  77.         if echo "$consolefont" | grep -q "Terminus"; then
  78.             apt-install console-terminus || true
  79.         fi
  80.     fi
  81.     ;;
  82.     cyr)
  83.     apt-install console-cyrillic || true
  84.     ;;
  85. esac
  86.  
  87. exit 0
  88.