crude pip caching, remove no-op fstab

This commit is contained in:
Anthony Young 2011-09-13 00:04:57 -07:00
parent 1bbd9e01df
commit 5f6c93b1fc

View file

@ -13,16 +13,6 @@ COPYENV=${COPYENV:-1}
lxc-stop -n $CONTAINER
lxc-destroy -n $CONTAINER
FSTAB=/tmp/fstab
cat > $FSTAB <<EOF
none /var/lib/lxc/$CONTAINER/dev/pts devpts defaults 0 0
none /var/lib/lxc/$CONTAINER/proc proc defaults 0 0
none /var/lib/lxc/$CONTAINER/sys sysfs defaults 0 0
none /var/lib/lxc/$CONTAINER/var/lock tmpfs defaults 0 0
none /var/lib/lxc/$CONTAINER/var/run tmpfs defaults 0 0
/var/cache/apt/ $APTCACHEDIR none bind 0 0
EOF
# Create network configuration
NET_CONF=/tmp/net.conf
cat > $NET_CONF <<EOF
@ -30,7 +20,6 @@ lxc.network.type = veth
lxc.network.link = $BRIDGE
lxc.network.flags = up
lxc.network.ipv4 = $CONTAINER_CIDR
lxc.mount = $FSTAB
EOF
# Configure the network
@ -80,12 +69,14 @@ cat > $RC_LOCAL <<EOF
/root/install.sh
EOF
# Setup apt cache
# Setup cache
# FIXME - use proper fstab mount
CWD=`pwd`
APTCACHEDIR=$CWD/cache/apt
mkdir -p $APTCACHEDIR
cp -pr $APTCACHEDIR/* $ROOTFS/var/cache/apt/
CACHEDIR=$CWD/cache/
mkdir -p $CACHEDIR/apt
mkdir -p $CACHEDIR/pip
cp -pr $CACHEDIR/apt/* $ROOTFS/var/cache/apt/
cp -pr $CACHEDIR/pip/* $ROOTFS/var/cache/pip/
# Configure cgroup directory
mkdir -p /cgroup