Mount /proc in VM and fix warning
[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
f9ceed37
MG
9virtfs /mnt 9p trans=virtio 0 0
10tmpfs /tmp tmpfs defaults 0 0
11procfs /proc procfs defaults 0 0
56e0b658 12EOF
fdb99417 13cat > vm/.profile <<EOF
0f817fa6 14mount /mnt
a64435a8 15mount /tmp
f9ceed37
MG
16mount /proc
17[ -e /dev/ttyS1 ] && stty -F /dev/ttyS1 -echo
fdb99417
MG
18cd /mnt
19export PS1="# "
20EOF
6f7e6b07
MG
21cat >> vm/etc/sudoers <<EOF
22Defaults>nobody closefrom=5
23Defaults>nobody !env_check
24Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME"
25EOF
df00c00b 26install gruntmaster-exec gruntmaster-compile vm/usr/bin/
2a6db364 27umount vm/proc
fdb99417 28mksquashfs vm vm.squashfs -comp lzo
This page took 0.011704 seconds and 4 git commands to generate.