github.com/schwarzm/garden-linux@v0.0.0-20150507151835-33bca2147c47/old/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 mkdir -p $rootfs_path/sbin 13 cp bin/wshd $rootfs_path/sbin/wshd 14 cp lib/hook $rootfs_path/sbin/hook 15 cp etc/config $rootfs_path/etc/config 16 chown $root_uid:$root_uid $rootfs_path/sbin/wshd 17 chown $root_uid:$root_uid $rootfs_path/sbin/hook 18 chown $root_uid:$root_uid $rootfs_path/etc/config 19 chmod 700 $rootfs_path/sbin/wshd 20 21 mkdir -p $rootfs_path/dev/pts 22 chown $root_uid:$root_uid $rootfs_path/dev/pts 23 mount -n -t devpts -o newinstance,ptmxmode=0666 devpts $rootfs_path/dev/pts 24 mkdir -p $rootfs_path/dev/shm