Browse code

Add some kernel modules to container

Dean Troyer authored on 2011/09/22 10:06:01
Showing 1 changed files
... ...
@@ -29,6 +29,7 @@ if ! which cgdelete | grep -q cgdelete; then
29 29
     cd libcgroup-0.37.1
30 30
     ./configure
31 31
     make install
32
+    ldconfig
32 33
 fi
33 34
 
34 35
 # Create lxc configuration
... ...
@@ -99,6 +100,11 @@ echo stack:pass | chroot $ROOTFS chpasswd
99 99
 # stack requires)
100 100
 echo "stack ALL=(ALL) NOPASSWD: ALL" >> $ROOTFS/etc/sudoers
101 101
 
102
+# Copy kernel modules
103
+mkdir -p $ROOTFS/lib/modules/`uname -r`/kernel
104
+cp -p /lib/modules/`uname -r`/modules.dep $ROOTFS/lib/modules/`uname -r`/
105
+cp -pR /lib/modules/`uname -r`/kernel/net $ROOTFS/lib/modules/`uname -r`/kernel/
106
+
102 107
 # Gracefully cp only if source file/dir exists
103 108
 function cp_it {
104 109
     if [ -e $1 ] || [ -d $1 ]; then