Add ruby test
[gruntmaster-daemon.git] / ex / makevm
... / ...
CommitLineData
1#!/bin/bash
2GROUP=$(getent group www-data | cut -f3 -d:)
3USER=$(getent passwd www-data | cut -f3 -d:)
4
5rm -rf vm/ vm.squashfs
6mkdir -p vm/proc/
7mount /proc -o bind vm/proc
8multistrap -f ex/vm.conf
9ln -s vm/usr/bin/mawk vm/bin/awk
10echo '/sbin/poweroff -f' > vm/.bash_logout
11cat > vm/etc/fstab <<EOF
12virtfs /mnt 9p trans=virtio,auto 0 0
13tmpfs /tmp tmpfs defaults 0 0
14EOF
15cat > vm/.profile <<EOF
16mount -a
17stty -F /dev/ttyS1 -echo
18cd /mnt
19export PS1="# "
20EOF
21cat > vm/etc/initramfs-tools/modules <<EOF
22squashfs
239p
249pnet
259pnet_virtio
26EOF
27cat >> vm/etc/sudoers <<EOF
28Defaults>nobody closefrom=5
29Defaults>nobody !env_check
30Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME"
31EOF
32install gruntmaster-exec gruntmaster-compile vm/usr/bin/
33chroot vm update-initramfs -d -k 3.2.0-4-amd64
34chroot vm update-initramfs -c -k 3.2.0-4-amd64
35umount vm/proc
36mksquashfs vm vm.squashfs -comp lzo
This page took 0.009209 seconds and 4 git commands to generate.