Also mount /tmp as tmpfs in VM
[gruntmaster-daemon.git] / ex / makevm
CommitLineData
fdb99417 1#!/bin/bash
fdb99417 2rm -rf vm/ vm.squashfs
2a6db364
MG
3mkdir -p vm/proc/
4mount /proc -o bind vm/proc
e6b9e086 5multistrap -f ex/vm.conf
fdb99417 6ln -s vm/usr/bin/mawk vm/bin/awk
fdb99417 7echo '/sbin/poweroff -f' > vm/.bash_logout
56e0b658 8cat > vm/etc/fstab <<EOF
0f817fa6
MG
9virtfs /mnt 9p trans=virtio 0 0
10tmpfs /tmp tmpfs defaults 0 0
56e0b658 11EOF
fdb99417 12cat > vm/.profile <<EOF
0f817fa6 13mount /mnt
a64435a8 14mount /tmp
fdb99417
MG
15stty -F /dev/ttyS1 -echo
16cd /mnt
17export PS1="# "
18EOF
6f7e6b07
MG
19cat >> vm/etc/sudoers <<EOF
20Defaults>nobody closefrom=5
21Defaults>nobody !env_check
22Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME"
23EOF
df00c00b 24install gruntmaster-exec gruntmaster-compile vm/usr/bin/
2a6db364 25umount vm/proc
fdb99417 26mksquashfs vm vm.squashfs -comp lzo
This page took 0.012094 seconds and 4 git commands to generate.