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