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 / share / ubiquity / summary < prev    next >
Encoding:
Text File  |  2007-04-12  |  1.8 KB  |  74 lines

  1. #! /bin/sh
  2. #set -e
  3.  
  4. . /usr/share/debconf/confmodule
  5.  
  6. db_get languagechooser/language-name
  7. db_subst ubiquity/summary LANGUAGE "$RET"
  8. if db_get console-setup/variant && [ "$RET" ]; then
  9.     db_subst ubiquity/summary KEYMAP "$RET"
  10. else
  11.     db_get console-setup/layout
  12.     db_subst ubiquity/summary KEYMAP "$RET"
  13. fi
  14. db_get passwd/user-fullname
  15. db_subst ubiquity/summary FULLNAME "$RET"
  16. db_get passwd/username
  17. db_subst ubiquity/summary USERNAME "$RET"
  18. db_get time/zone # actually continent/city (usually)
  19. db_subst ubiquity/summary LOCATION "$RET"
  20.  
  21. # Migration Assistant
  22. db_capb escape
  23. ret=""
  24. newline='
  25. '
  26. db_get migration-assistant/partitions
  27. OLD_IFS="$IFS"
  28. IFS='
  29. '
  30. partitions="$(echo "$RET" | sed -e 's/, /\n/g')"
  31. for choice in $partitions; # Microsoft Windows XP Professional (/dev/hda1)
  32. do
  33.     ret="$ret$choice:$newline"
  34.     part="$(expr match "$choice" '.*/\(.*\))$')" # hda1
  35.     
  36.     db_get "migration-assistant/$part/users"
  37.     if [ -z "$RET" ]; then
  38.         ret="${ret}None$newline"
  39.     fi
  40.     users="$(echo "$RET" | sed -e 's/, /\n/g')"
  41.     for user in $users; do
  42.         ret="$ret$user: "
  43.         formatted_user="$(echo "$user" | sed -e 's/ /:/g')"
  44.         db_get "migration-assistant/$part/$formatted_user/items"
  45.         ret="$ret$RET$newline"
  46.     done
  47.     ret="$ret$newline"
  48. done
  49. IFS="$OLD_IFS"
  50. db_subst ubiquity/summary MIGRATE "${ret%$newline}"
  51. db_capb
  52.  
  53. # We need to run this to get hold of the partitioning summary. Our component
  54. # takes care of ensuring that changes are not actually committed.
  55. if [ "$PARTMAN_UPDATE_BEFORE_COMMIT" ]; then
  56.     partman-commit || true
  57. fi
  58.  
  59. db_capb escape
  60. db_get ubiquity/partman-made-changes
  61. if [ "$RET" = true ]; then
  62.     db_metaget partman/confirm Extended_description
  63. else
  64.     db_metaget partman/confirm_nochanges Extended_description
  65. fi
  66. db_subst ubiquity/summary PARTMAN_CHANGES \
  67.     "$(printf %s "$RET" | debconf-escape -e)"
  68. db_capb
  69.  
  70. db_input high ubiquity/summary || true
  71. db_go
  72.  
  73. exit 0
  74.