~ubuntu-branches/ubuntu/precise/lxc/precise

« back to all changes in this revision

Viewing changes to templates/lxc-ubuntu.in

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2012-04-12 09:54:22 UTC
  • Revision ID: package-import@ubuntu.com-20120412095422-lzg0tj2ktp5669zs
Tags: 0.7.5-3ubuntu51
0070-templates-rmdir-dev-shm: in precise containers, rmdir $rootfs/dev/shm
and and create it as a symbolic link to /run/shm.  (LP: #974584)

Show diffs side-by-side

added added

removed removed

Lines of Context:
491
491
        chroot $rootfs apt-get update
492
492
        chroot $rootfs apt-get install --force-yes -y --no-install-recommends upstart:${hostarch} mountall:amd64 iproute:amd64 isc-dhcp-client:amd64
493
493
    fi
 
494
 
 
495
    # rmdir /dev/shm in precise containers.
 
496
    # I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did
 
497
    # get bind mounted to the host's /run/shm.  So try to rmdir
 
498
    # it, and in case that fails move it out of the way.
 
499
    if [ $release = "precise" ]; then
 
500
        [ -d "$rootfs/dev/shm" ] && rmdir $rootfs/dev/shm
 
501
        [ -e "$rootfs/dev/shm" ] && mv $rootfs/dev/shm $rootfs/dev/shm.bak
 
502
        ln -s /run/shm $rootfs/dev/shm
 
503
    fi
494
504
}
495
505
 
496
506
do_bindhome()