~serge-hallyn/ubuntu/quantal/lxc/lxc-user-ns

« back to all changes in this revision

Viewing changes to templates/lxc-ubuntu.in

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn, Stéphane Graber, Serge Hallyn
  • Date: 2012-06-26 13:04:01 UTC
  • Revision ID: package-import@ubuntu.com-20120626130401-8tclzscid8u2lzxu
Tags: 0.8.0~rc1-4ubuntu17
[ Stéphane Graber ]
* 0090-lxc-ubuntu-use-dpkg-add-architecture: Update lxc-ubuntu
  template to use "dpkg --add-architecture" in containers running
  dpkg >= 1.16.2. (LP: #1017862)

[ Serge Hallyn ]
* 0091-introduce-container-hooks.patch: introduce container hooks at several
  points in the container life-cycle.
* Add copyright statement to lxc-aa-custom-profile
* Add debian/hooks/mountcgroups as an example (installed under
  /usr/share/lxc/hooks)

Show diffs side-by-side

added added

removed removed

Lines of Context:
474
474
 
475
475
    # If the container isn't running a native architecture, setup multiarch
476
476
    if [ -x "$(ls -1 ${rootfs}/usr/bin/qemu-*-static 2>/dev/null)" ]; then
477
 
        mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d
478
 
        echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch
 
477
        dpkg_version=$(chroot $rootfs dpkg-query -W -f='${Version}' dpkg)
 
478
        if chroot $rootfs dpkg --compare-versions $dpkg_version ge "1.16.2"; then
 
479
            chroot $rootfs dpkg --add-architecture ${hostarch}
 
480
        else
 
481
            mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d
 
482
            echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch
 
483
        fi
479
484
 
480
485
        # Save existing value of MIRROR and SECURITY_MIRROR
481
486
        DEFAULT_MIRROR=$MIRROR