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