#!/bin/bash GROUP=$(getent group www-data | cut -f3 -d:) USER=$(getent passwd www-data | cut -f3 -d:) rm -rf vm/ vm.squashfs mkdir -p vm/proc/ mount /proc -o bind vm/proc multistrap -f ex/vm.conf ln -s vm/usr/bin/mawk vm/bin/awk echo '/sbin/poweroff -f' > vm/.bash_logout cat > vm/etc/fstab < vm/.profile < vm/etc/initramfs-tools/modules <> vm/etc/sudoers <nobody closefrom=5 Defaults>nobody !env_check Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME" EOF install gruntmaster-exec gruntmaster-compile vm/usr/bin/ chroot vm update-initramfs -d -k 3.2.0-4-amd64 chroot vm update-initramfs -c -k 3.2.0-4-amd64 umount vm/proc mksquashfs vm vm.squashfs -comp lzo