home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / ubiquity / tzsetup < prev   
Encoding:
Text File  |  2006-07-27  |  1.5 KB  |  49 lines

  1. #! /bin/sh
  2. set -e
  3.  
  4. . /usr/share/debconf/confmodule
  5. db_capb backup
  6.  
  7. # For now, this is a separate script from tzsetup because we want to ask the
  8. # time zone question even if there's only one plausible zone for the
  9. # selected language's default country.
  10.  
  11. db_get debian-installer/country
  12. CC="$RET"
  13. # per-country templates are used for countries with multiple choices
  14. if db_get "tzsetup/country/$CC"; then
  15.     db_register "tzsetup/country/$CC" time/zone
  16.     db_fget time/zone seen
  17.     if [ "$RET" = false ]; then
  18.         db_reset time/zone
  19.     fi
  20.     db_input high time/zone || :
  21.     if ! db_go; then
  22.         exit 10 # back to menu
  23.     fi
  24. else
  25.     db_register time/zone time/zone # might be registered to something else
  26.     # tzmap is also in oem-config-timezone (with a different path);
  27.     # later, this should be moved into a tzsetup.deb.
  28.     zone=$(grep "^$CC" /usr/lib/ubiquity/tzsetup/tzmap | cut -d ' ' -f 2)
  29.     db_set time/zone "$zone"
  30.     db_input high time/zone || true
  31.     if ! db_go; then
  32.         exit 10 # back to menu
  33.     fi
  34. fi
  35.  
  36. # Reconfigure locale according to the selected country. We rely on
  37. # ubiquity/components/timezone.py having set debian-installer/country for
  38. # us.
  39. db_get debian-installer/country
  40. country="$RET"
  41. db_set mirror/country "$country"
  42. db_get debian-installer/locale
  43. newlocale="$(echo "$RET" | sed "s/_[A-Z][A-Z]*/_$country/")"
  44. db_set debian-installer/locale "$newlocale"
  45. db_fset debian-installer/locale seen true
  46. db_set localechooser/alreadyrun false
  47. PATH="/usr/lib/ubiquity/localechooser:$PATH" \
  48.     /usr/lib/ubiquity/localechooser/localechooser
  49.