~ubuntu-branches/ubuntu/oneiric/base-installer/oneiric

« back to all changes in this revision

Viewing changes to debian/bootstrap-base.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-09-23 16:47:35 UTC
  • mfrom: (0.2.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090923164735-9c4nry21j5g4puxo
Tags: 1.102ubuntu1
* Resynchronise with Debian (STANZAS addition fixes LP: #435376).
  Remaining changes:
  - Use and depend on the Ubuntu keyring.
  - Enable the restricted component by default, unless
    apt-setup/restricted is preseeded to false.
  - Set up the default sources.list to look in -updates and -security (the
    latter from apt-setup/security_host) as well as the unadorned suite;
    also -proposed if apt-setup/proposed is true.
  - Use Ubuntu kernel image names.
  - Allow preseeding base-installer/kernel/override-image to force a given
    kernel to be used.
  - Install busybox-initramfs rather than busybox.
  - Revert Joey's patch to call base-installer.d hooks after running
    debootstrap, which broke console-setup's expectation of being able to
    insert its configuration file into /target before console-setup is
    installed by debootstrap.
  - Add armel/imx51 and armel/dove subarchitectures.
  - Prefer PAE kernels on machines with >3GB of RAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
export IT_LANG_OVERRIDE=C
36
36
 
37
37
 
38
 
# See kernel/README for the architecture-specific functions expected here.
 
38
# See kernel/README for the architecture-specific functions expected here
39
39
if [ -f /usr/lib/base-installer/kernel.sh ]; then
40
40
        . /usr/lib/base-installer/kernel.sh
41
41
else
83
83
 
84
84
        test -d $ETCDIR || mkdir -p $ETCDIR
85
85
 
 
86
        local copied_fstab=
86
87
        if [ -f /target/etc/fstab ] ; then
87
 
                # programs in debootstrap may scrawl on the fstab,
88
 
                # so make a backup to be restored later
89
 
                copied_fstab=true
 
88
                # programs in debootstrap may scrawl on the fstab and
 
89
                # a configured fstab can cause problems, so make a backup
 
90
                # to be restored later and create a dummy file instead
 
91
                copied_fstab=1
90
92
                cp /target/etc/fstab /target/etc/fstab.orig
91
 
                echo "# UNCONFIGURED FSTAB FOR BASE SYSTEM" >> /target/etc/fstab
 
93
                echo "# UNCONFIGURED FSTAB FOR BASE SYSTEM" >/target/etc/fstab
92
94
        fi
93
95
 
94
96
        if [ "$PROTOCOL" = "http" ]; then
102
104
        # clean up after any past debootstrap run
103
105
        rm -f /target/var/lib/apt/* 2>/dev/null || true
104
106
 
 
107
        local debootstrap_failed=
105
108
        if search-path cdebootstrap; then
106
109
                cdebootstrap || debootstrap_failed=$?
107
110
        else
117
120
                        || debootstrap_failed=$?
118
121
        fi
119
122
 
120
 
        if [ true = "$copied_fstab" ] ; then
 
123
        if [ "$copied_fstab" ]; then
121
124
                mv /target/etc/fstab.orig /target/etc/fstab
122
125
        fi
123
126
 
124
 
        if [ "$debootstrap_failed" ] ; then
 
127
        if [ "$debootstrap_failed" ]; then
125
128
                exit_error base-installer/debootstrap-failed
126
129
        fi
127
130
 
128
 
        # Progress bar is now stepped to 100.
 
131
        # Progress bar is now stepped to 100
129
132
}
130
133
 
131
134
waypoint 1      check_target