github.com/cloudfoundry-attic/garden-linux@v0.333.2-candidate/linux_backend/skeleton/lib/hook-parent-before-clone.sh (about)

     1  #!/bin/bash
     2  
     3  [ -n "$DEBUG" ] && set -o xtrace
     4  set -o nounset
     5  set -o errexit
     6  shopt -s nullglob
     7  
     8  cd $(dirname $0)/../
     9  
    10  source ./etc/config
    11  
    12  cp etc/config $rootfs_path/etc/config
    13  chown $root_uid:$root_uid $rootfs_path/etc/config
    14  
    15  mkdir -p $rootfs_path/dev/pts
    16  ln -s /dev/pts/ptmx $rootfs_path/dev/ptmx
    17  chown -h $root_uid:$root_uid $rootfs_path/dev/ptmx
    18  
    19  # hack to ensure proc is owned by correct user until translation
    20  mkdir -p $rootfs_path/proc
    21  chown $root_uid:$root_uid $rootfs_path/proc
    22  chmod 777 /tmp