Added firstboot script

Paul Wagener 12 years ago
parent 2a92031320
commit 4f7a6b215c
  1. 0
      build-vm/boot.sh
  2. 7
      build-vm/build.sh
  3. 15
      build-vm/firstboot.sh

@ -1,11 +1,14 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Building Virtual Machine for Avans Security Workshop..."
echo "(Requires vmbuilder, install with: 'sudo apt-get install python-vm-builder')"
sudo vmbuilder vmw6 ubuntu --flavour virtual --arch i386 -o \
--firstboot boot.sh \
--firstboot $DIR/firstboot.sh \
--user security --pass security --name "Security Workshop" \
--addpkg apache2 --addpkg apache2-mpm-prefork --addpkg phpmyadmin \
--addpkg apache2 --addpkg apache2-mpm-prefork \
--addpkg git-core \
--addpkg php5-cli --addpkg php5-mysql --addpkg libapache2-mod-php5 \
--addpkg mysql-server --addpkg mysql-client

@ -0,0 +1,15 @@
#!/bin/sh
# This script is run the first time the VM boots up.
# It configures the VM for the security workshop
DIR=/home/security/workshop
echo "Initializing this VM for the Security Workshop..."
# Get the workshop files
git clone https://github.com/Avans/Security-Workshop.git $DIR
# Add boot.sh to the boot sequence
echo "$DIR/build-vm/boot.sh" >> /etc/rc.local
# Resume normal boot sequence
$DIR/build-vm/boot.sh
Loading…
Cancel
Save