wok-4.x rev 5821

get-virtualbox: load net modules too
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 15 14:22:49 2010 +0200 (2010-07-15)
parents ce3fc5cd3c68
children 1003bb898736
files get-virtualbox/stuff/get-virtualbox
line diff
     1.1 --- a/get-virtualbox/stuff/get-virtualbox	Thu Jul 15 13:45:55 2010 +0200
     1.2 +++ b/get-virtualbox/stuff/get-virtualbox	Thu Jul 15 14:22:49 2010 +0200
     1.3 @@ -66,6 +66,7 @@
     1.4  diff -U0 before after | grep ^+/ | sed 's|^\+/||' | \
     1.5  ( cd / ; cpio -o -H newc ) | ( cd $PACKAGE-$VERSION/fs ; cpio -idm )
     1.6  
     1.7 +MODULE_LIST="vboxdrv vboxnetadp vboxnetflt"
     1.8  # Create pseudo package
     1.9  cat > $PACKAGE-$VERSION/receipt <<EOT
    1.10  # SliTaz package receipt.
    1.11 @@ -80,7 +81,7 @@
    1.12  
    1.13  pre_remove()
    1.14  {
    1.15 -    sed -i 's//vboxdrv /' \$1/etc/rcS.conf
    1.16 +    sed -i 's/$MODULE_LIST //' \$1/etc/rcS.conf
    1.17      chroot "\$1/" delgroup vboxusers
    1.18  }
    1.19  
    1.20 @@ -88,9 +89,9 @@
    1.21  {
    1.22  $(grep '  udev[atp]' install/install.sh)
    1.23      chroot "\$1/" depmod -a $(uname -r)
    1.24 -    [ -n "\$1" ] || modprobe vboxdrv
    1.25 +    [ -n "\$1" ] || for i in $MODULE_LIST; do modprobe \$i ; done
    1.26      grep -qs vboxdrv \$1/etc/rcS.conf ||
    1.27 -    sed -i 's/LOAD_MODULES="/&vboxdrv /' \$1/etc/rcS.conf
    1.28 +    sed -i 's/LOAD_MODULES="/&$MODULE_LIST /' \$1/etc/rcS.conf
    1.29      
    1.30      # Add vboxusers group
    1.31      grep -qs ^vboxusers \$1/etc/group ||