Magellan Linux

Diff of /trunk/virtualbox/virtualbox-config.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 860 by niro, Wed Jul 1 18:02:28 2009 UTC revision 986 by niro, Fri Feb 19 12:38:29 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $Header: /root/magellan-cvs/src/virtualbox/virtualbox-config.sh,v 1.9 2009-07-01 18:02:28 niro Exp $  # $Header: /root/magellan-cvs/src/virtualbox/virtualbox-config.sh,v 1.11 2010-02-19 12:38:29 niro Exp $
3  # Configures virtualbox for Magellan-Linux  # Configures virtualbox for Magellan-Linux
4    
5  LIBDIR=/usr/lib  LIBDIR=/usr/lib
6  INSTDIR=${LIBDIR}/virtualbox  INSTDIR=${LIBDIR}/virtualbox
7  VBOXMODULE=vboxdrv.ko  VBOXMODULE=vboxdrv.ko
8  VBOXNETMODULE=vboxnetflt.ko  VBOXNETMODULE=vboxnetflt.ko
9    VBOXNETADPMODULE=vboxnetadp.ko
10    
11  COLRED="\033[1;6m\033[31m"  COLRED="\033[1;6m\033[31m"
12  COLGREEN="\033[1;6m\033[32m"  COLGREEN="\033[1;6m\033[32m"
# Line 45  then Line 46  then
46   die "No kernel sources for kernel ${KERNEL_VERSION} found! Aborting."   die "No kernel sources for kernel ${KERNEL_VERSION} found! Aborting."
47  fi  fi
48    
49  for module in ${VBOXMODULE} ${VBOXNETMODULE}  for module in ${VBOXMODULE} ${VBOXNETMODULE} ${VBOXNETADPMODULE}
50  do  do
51   if [[ -f /lib/modules/${KERNEL_VERSION}/misc/${module} ]]   if [[ -f /lib/modules/${KERNEL_VERSION}/misc/${module} ]]
52   then   then
# Line 59  do Line 60  do
60   fi   fi
61  done  done
62    
63  for module in ${VBOXMODULE} ${VBOXNETMODULE}  for module in ${VBOXMODULE} ${VBOXNETMODULE} ${VBOXNETADPMODULE}
64  do  do
65   # compile the module   # compile the module
66   cd ${INSTDIR}/src/${module/.ko/}   cd ${INSTDIR}/src/${module/.ko/}
# Line 93  fi Line 94  fi
94  # load the module  # load the module
95  if [[ x$(uname -r) = x${KERNEL_VERSION} ]]  if [[ x$(uname -r) = x${KERNEL_VERSION} ]]
96  then  then
97   for module in ${VBOXMODULE} ${VBOXNETMODULE}   for module in ${VBOXMODULE} ${VBOXNETMODULE} ${VBOXNETADPMODULE}
98   do   do
99   mecho "Loading kernel-module ${module} ..."   mecho "Loading kernel-module ${module} ..."
100   modprobe $(basename ${module} .ko)   modprobe $(basename ${module} .ko)
# Line 102  else Line 103  else
103   echo -e ${COLRED}   echo -e ${COLRED}
104   echo "Your current running kernel does not match the the module target."   echo "Your current running kernel does not match the the module target."
105   echo "You must boot into your target kernel and load the modules manually,"   echo "You must boot into your target kernel and load the modules manually,"
106   echo "before you can use virtual box."   echo "before you can use virtualbox."
107   echo -en ${COLDEFAULT}   echo -en ${COLDEFAULT}
108  fi  fi
109    

Legend:
Removed from v.860  
changed lines
  Added in v.986