Enable binfmt_misc and do not use fstab
[gruntmaster-daemon.git] / ex / makevm
... / ...
CommitLineData
1#!/bin/bash
2rm -rf vm/ vm.squashfs
3mkdir -p vm/proc/
4mount /proc -o bind vm/proc
5multistrap -f ex/vm.conf
6ln -s vm/usr/bin/mawk vm/bin/awk
7echo '/sbin/poweroff -f' > vm/.bash_logout
8cat > vm/.profile <<EOF
9mount -t 9p -o trans=virtio virtfs /mnt
10mount -t ramfs ramfs /tmp
11mount -t proc proc /proc
12mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
13echo ':jar:M::PK\x03\x04::/usr/bin/jexec:' > /proc/sys/fs/binfmt_misc/register
14[ -e /dev/ttyS1 ] && stty -F /dev/ttyS1 -echo
15cd /mnt
16export PS1="# "
17EOF
18cat >> vm/etc/sudoers <<EOF
19Defaults>nobody closefrom=5
20Defaults>nobody !env_check
21Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME"
22EOF
23install gruntmaster-exec gruntmaster-compile vm/usr/bin/
24umount vm/proc
25mksquashfs vm vm.squashfs -comp lzo
This page took 0.009561 seconds and 4 git commands to generate.