Browse code

crude pip caching, remove no-op fstab

Anthony Young authored on 2011/09/13 16:04:57
Showing 1 changed files
... ...
@@ -13,16 +13,6 @@ COPYENV=${COPYENV:-1}
13 13
 lxc-stop -n $CONTAINER
14 14
 lxc-destroy -n $CONTAINER
15 15
 
16
-FSTAB=/tmp/fstab
17
-cat > $FSTAB <<EOF
18
-none /var/lib/lxc/$CONTAINER/dev/pts devpts defaults 0 0
19
-none /var/lib/lxc/$CONTAINER/proc proc defaults 0 0
20
-none /var/lib/lxc/$CONTAINER/sys sysfs defaults 0 0
21
-none /var/lib/lxc/$CONTAINER/var/lock tmpfs defaults 0 0
22
-none /var/lib/lxc/$CONTAINER/var/run tmpfs defaults 0 0
23
-/var/cache/apt/ $APTCACHEDIR none bind 0 0
24
-EOF
25
-
26 16
 # Create network configuration
27 17
 NET_CONF=/tmp/net.conf
28 18
 cat > $NET_CONF <<EOF
... ...
@@ -30,7 +20,6 @@ lxc.network.type = veth
30 30
 lxc.network.link = $BRIDGE
31 31
 lxc.network.flags = up
32 32
 lxc.network.ipv4 = $CONTAINER_CIDR
33
-lxc.mount = $FSTAB
34 33
 EOF
35 34
 
36 35
 # Configure the network
... ...
@@ -80,12 +69,14 @@ cat > $RC_LOCAL <<EOF
80 80
 /root/install.sh
81 81
 EOF
82 82
 
83
-# Setup apt cache
83
+# Setup cache
84 84
 # FIXME - use proper fstab mount
85 85
 CWD=`pwd`
86
-APTCACHEDIR=$CWD/cache/apt
87
-mkdir -p $APTCACHEDIR
88
-cp -pr $APTCACHEDIR/* $ROOTFS/var/cache/apt/
86
+CACHEDIR=$CWD/cache/
87
+mkdir -p $CACHEDIR/apt
88
+mkdir -p $CACHEDIR/pip
89
+cp -pr $CACHEDIR/apt/* $ROOTFS/var/cache/apt/
90
+cp -pr $CACHEDIR/pip/* $ROOTFS/var/cache/pip/
89 91
 
90 92
 # Configure cgroup directory
91 93
 mkdir -p /cgroup