]>
Commit | Line | Data |
---|---|---|
fdb99417 | 1 | #!/bin/bash |
5cb2e97f MG |
2 | GROUP=$(getent group www-data | cut -f3 -d:) |
3 | USER=$(getent passwd www-data | cut -f3 -d:) | |
4 | ||
fdb99417 | 5 | rm -rf vm/ vm.squashfs |
2a6db364 MG |
6 | mkdir -p vm/proc/ |
7 | mount /proc -o bind vm/proc | |
e6b9e086 | 8 | multistrap -f ex/vm.conf |
fdb99417 | 9 | ln -s vm/usr/bin/mawk vm/bin/awk |
fdb99417 | 10 | echo '/sbin/poweroff -f' > vm/.bash_logout |
56e0b658 MG |
11 | cat > vm/etc/fstab <<EOF |
12 | virtfs /mnt 9p trans=virtio,auto 0 0 | |
13 | tmpfs /tmp tmpfs defaults 0 0 | |
14 | EOF | |
fdb99417 MG |
15 | cat > vm/.profile <<EOF |
16 | mount -a | |
17 | stty -F /dev/ttyS1 -echo | |
18 | cd /mnt | |
19 | export PS1="# " | |
20 | EOF | |
21 | cat > vm/etc/initramfs-tools/modules <<EOF | |
22 | squashfs | |
23 | 9p | |
24 | 9pnet | |
25 | 9pnet_virtio | |
26 | EOF | |
df00c00b | 27 | install gruntmaster-exec gruntmaster-compile vm/usr/bin/ |
4e08f696 | 28 | sed -i -e "s/USER => 65534/USER => $USER/" -e "s/GROUP => 65534/GROUP => $GROUP/" vm/usr/bin/gruntmaster-exec |
fdb99417 MG |
29 | chroot vm update-initramfs -d -k 3.2.0-4-amd64 |
30 | chroot vm update-initramfs -c -k 3.2.0-4-amd64 | |
2a6db364 | 31 | umount vm/proc |
fdb99417 | 32 | mksquashfs vm vm.squashfs -comp lzo |