#!/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 < 65534/USER => $USER/" -e "s/GROUP => 65534/GROUP => $GROUP/" vm/usr/bin/gruntmaster-exec 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