~gilir/+junk/ubiquity-lxdm-autologin

« back to all changes in this revision

Viewing changes to d-i/source/migration-assistant/ma-script-utils

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Jonathan Riddell
  • Date: 2007-02-22 09:59:44 UTC
  • Revision ID: james.westby@ubuntu.com-20070222095944-7hzx8c1kybvi50o9
Tags: 1.3.22
[ Colin Watson ]
* New partitioner:
  - Fix edit dialog not to try to resize partitions even if the resize
    spinbutton was left untouched (LP: #85227).
  - Add contextual buttons to GTK frontend (part of LP: #83166).
  - Add an undo facility.
  - partman-* updates add validation support (LP: #82768); also add
    XFS-on-/boot validation.
  - Break out of setting the mountpoint if it's invalid (LP: #84543).
* Fix crash if multiple newworld boot partitions are present (LP: #84429).
* GTK frontend:
  - Fix backup from user information page if migration-assistant is not
    active (LP: #85642).
  - Fix up step numbers if migration-assistant is disabled (LP: #85711).
  - Disable smooth zooming, as some video drivers are very slow at drawing
    this and it's hard to handle this dynamically (LP: #67572).
* Fill in a default username based on the user's full name (LP: #84550).
* Retranslate Forward button when going back from summary page
  (LP: #86047).
* configure.ac: Bump required GTK version to 2.10.0 (for GtkLinkButton).
* Automatic update of included source packages: apt-setup 1:0.16ubuntu4,
  base-installer 1.70ubuntu4, choose-mirror 2.10ubuntu2, clock-setup
  0.12ubuntu2, debian-installer-utils 1.42ubuntu2, migration-assistant
  0.4, partman-auto 62ubuntu5, partman-base 100ubuntu4,
  partman-basicfilesystems 51ubuntu2, partman-basicmethods 33ubuntu2,
  partman-efi 11ubuntu2, partman-ext3 45ubuntu2, partman-jfs 20ubuntu2,
  partman-newworld 16ubuntu1, partman-reiserfs 34ubuntu1, partman-target
  46ubuntu2, partman-xfs 32ubuntu1.

[ Jonathan Riddell ]
* Add new partitioner for KDE frontend

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
 
3
. /usr/share/debconf/confmodule
 
4
 
 
5
error () {
 
6
    logger -t migration-assistant "error: $@"
 
7
}
 
8
 
 
9
log () {
 
10
    logger -t migration-assistant "info: $@"
 
11
}
 
12
 
3
13
ostype=""
 
14
mountdevice=""
4
15
set_os_type () {
5
16
# Rather than test for every distro possible in the shortname, we test
6
17
# the bootloader type for 'linux.'  This *should* be fine as we're only
7
18
# working with user's home directories.
8
19
 
 
20
    mountdevice="${1%%:*}"
 
21
 
9
22
    if [ ${1##*:} = "linux" ]; then
10
23
        ostype="linux"
11
24
        return
27
40
}
28
41
mountpoint="/mnt/migrationassistant"
29
42
 
 
43
unmount_os() {
 
44
        umount $mountpoint >/dev/null || \
 
45
        umount $mountdevice >/dev/null || \
 
46
        log "There was no device to umount."
 
47
}
 
48
 
30
49
mount_os () {
31
50
    ostype="$1"
32
51
    device="$2"
33
52
    mkdir -p $mountpoint
 
53
        unmount_os
34
54
 
35
55
    if [ "$1" = "linux" ]; then
36
 
        mount $device $mountpoint
 
56
                mount $device $mountpoint
37
57
    elif [ "$1" = "windowsxp" ]; then
38
 
        mount -t ntfs $device $mountpoint -o umask=0022
 
58
                mount -t ntfs $device $mountpoint -o umask=0022,nls=utf8 || \
 
59
                log "Windows XP drive is not NTFS formatted or error, trying vfat"; \
 
60
                mount -t vfat $device $mountpoint -o umask=0022,utf8 || \
 
61
                log "Mounting with vfat didn't work."
39
62
    fi
40
63
 
41
64
}
42
65
 
43
 
unmount_os() {
44
 
    umount $mountpoint >/dev/null || true
45
 
}
46
 
 
47
66
ROOT=/target
48
67
add_user() {
49
68
    local username