home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / initramfs-tools / scripts / casper-bottom / 20xconfig < prev    next >
Encoding:
Text File  |  2006-08-23  |  1.2 KB  |  55 lines

  1. #!/bin/sh
  2.  
  3. PREREQ=""
  4. DESCRIPTION="Configuring X..."
  5.  
  6. . /scripts/functions
  7.  
  8. prereqs()
  9. {
  10.        echo "$PREREQ"
  11. }
  12.  
  13. case $1 in
  14. # get pre-requisites
  15. prereqs)
  16.        prereqs
  17.        exit 0
  18.        ;;
  19. esac
  20.  
  21. log_begin_msg "$DESCRIPTION"
  22.  
  23. if [ "$TERM_TYPE" = "serial" ]; then
  24.     # Don't bother trying to configure or start X on a serial console
  25.     rm -f /etc/rc?.d/S??[gxk]dm
  26.     exit 0
  27. fi
  28.  
  29. locale=en_US.UTF-8
  30.  
  31. for x in $(cat /proc/cmdline); do
  32.                 case $x in
  33.                         debian-installer/locale=*)
  34.                                 locale=${x#debian-installer/locale=}
  35.                                 ;;
  36.                         locale=*)
  37.                                 locale=${x#locale=}
  38.                                 ;;
  39.                 esac
  40. done
  41.  
  42. mount -n -o bind /sys /root/sys
  43. mount -n -o bind /proc /root/proc
  44.  
  45. chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF
  46. set xserver-xorg/autodetect_keyboard true
  47. fset xserver-xorg/autodetect_keyboard seen true
  48. EOF
  49.  
  50. DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 | sed -e 's, .*,,' -e q) casper-reconfigure /root xserver-xorg
  51. umount /root/sys
  52. umount /root/proc
  53.  
  54. log_end_msg
  55.