~ubuntu-branches/ubuntu/lucid/debian-installer-utils/lucid

« back to all changes in this revision

Viewing changes to chroot-setup.sh

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-11-15 17:38:02 UTC
  • mfrom: (1.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115173802-g68q73reqp353p4l
Tags: 1.72ubuntu1
* Resynchronise with Debian. Remaining changes:
  - user-params: Don't propagate vga=* or break=* to installed system.
  - Use /proc/self/fd/4 rather than /dev/fd/4 in fetch-url-methods/http;
    the latter doesn't seem to exist in d-i.
  - list-devices: new "mmc-partition" type for detecting partitions on MMC
    devices.
  - Don't include the battery subsystem on calls to udevadm trigger.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
EOF
45
45
        chmod a+rx /target/sbin/start-stop-daemon
46
46
        
 
47
        # If Upstart is in use, add a dummy initctl to stop it starting jobs.
 
48
        if [ -x /target/sbin/initctl ]; then
 
49
                mv /target/sbin/initctl /target/sbin/initctl.REAL
 
50
                cat > /target/sbin/initctl <<EOF
 
51
#!/bin/sh
 
52
echo 1>&2
 
53
echo 'Warning: Fake initctl called, doing nothing.' 1>&2
 
54
exit 0
 
55
EOF
 
56
                chmod a+rx /target/sbin/initctl
 
57
        fi
 
58
 
47
59
        # Record the current mounts
48
60
        mountpoints > /tmp/mount.pre
49
61
 
104
116
chroot_cleanup () {
105
117
        rm -f /target/usr/sbin/policy-rc.d
106
118
        mv /target/sbin/start-stop-daemon.REAL /target/sbin/start-stop-daemon
 
119
        if [ -x /target/sbin/initctl.REAL ]; then
 
120
                mv /target/sbin/initctl.REAL /target/sbin/initctl
 
121
        fi
107
122
 
108
123
        # Undo the mounts done by the packages during installation.
109
124
        # Reverse sorting to umount the deepest mount points first.