#!/bin/bash # Configurable params BRIDGE=${BRIDGE:-br0} CONTAINER=${CONTAINER:-TESTER} CONTAINER_IP=${CONTAINER_IP:-192.168.1.50} CONTAINER_CIDR=${CONTAINER_CIDR:-$CONTAINER_IP/24} CONTAINER_NETMASK=${CONTAINER_NETMASK:-255.255.255.0} CONTAINER_GATEWAY=${CONTAINER_GATEWAY:-192.168.1.1} NAMESERVER=${NAMESERVER:-192.168.1.1} COPYENV=${COPYENV:-1} WARMCACHE=${WARMCACHE:-0} # Destroy any existing container lxc-stop -n $CONTAINER sleep 1 lxc-destroy -n $CONTAINER sleep 1 # Create network configuration NET_CONF=/tmp/net.conf cat > $NET_CONF < $INTERFACES < $INSTALL_SH < $RC_LOCAL <