]>
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 | cat > vm/.profile <<EOF |
3dc5f36d MG |
8 | mount -t 9p -o trans=virtio virtfs /mnt |
9 | mount -t ramfs ramfs /tmp | |
10 | mount -t proc proc /proc | |
11 | mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc | |
12 | echo ':jar:M::PK\x03\x04::/usr/bin/jexec:' > /proc/sys/fs/binfmt_misc/register | |
fa6276b8 | 13 | [ -e /dev/ttyS1 ] && stty -F /dev/ttyS1 raw -echo |
fdb99417 MG |
14 | cd /mnt |
15 | export PS1="# " | |
16 | EOF | |
6f7e6b07 MG |
17 | cat >> vm/etc/sudoers <<EOF |
18 | Defaults>nobody closefrom=5 | |
19 | Defaults>nobody !env_check | |
20 | Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME" | |
21 | EOF | |
df00c00b | 22 | install gruntmaster-exec gruntmaster-compile vm/usr/bin/ |
2a6db364 | 23 | umount vm/proc |
fdb99417 | 24 | mksquashfs vm vm.squashfs -comp lzo |