- Timestamp:
- Nov 17, 2008 3:27:53 PM (16 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/Makefile.kmk
r14015 r14256 250 250 # files that needs editing before they can be included in the generic installer. 251 251 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@) 252 $(QUIET)$(SED_EXT) -e "s|%NOLSB%|yes|g; s|%PACKAGE%|virtualbox|g" --output $@ $< 252 $(QUIET)$(SED_EXT) \ 253 -e "s|%NOLSB%|yes|g" \ 254 -e "s|%NETFLT%|$(VBOX_WITH_NETFLT)|g" \ 255 -e "s|%PACKAGE%|virtualbox|g" \ 256 --output $@ \ 257 $< 253 258 254 259 $(VBOX_LNX_INST_OUT_DIR)/vboxnet.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxnet.sh.in | $$(dir $$@) -
trunk/src/VBox/Installer/linux/vboxdrv.sh.in
r14016 r14256 29 29 PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH 30 30 DEVICE=/dev/vboxdrv 31 MODNAME=vboxdrv32 31 GROUPNAME=vboxusers 33 32 LOG="/var/log/vbox-install.log" 34 33 NOLSB=%NOLSB% 34 NETFLT=%NETFLT% 35 35 36 36 [ -f /lib/lsb/init-functions ] || NOLSB=yes … … 39 39 if [ -n "$INSTALL_DIR" ]; then 40 40 VBOXMANAGE="$INSTALL_DIR/VBoxManage" 41 BUILDINTMP="$INSTALL_DIR/src/vboxdrv/build_in_tmp" 41 BUILDVBOXDRV="$INSTALL_DIR/src/vboxdrv/build_in_tmp" 42 BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxnetflt/build_in_tmp" 42 43 else 43 44 VBOXMANAGE="/usr/lib/%PACKAGE%/VBoxManage" 44 BUILDINTMP="/usr/share/%PACKAGE%/src/vboxdrv/build_in_tmp" 45 BUILDVBOXDRV="/usr/share/%PACKAGE%/src/vboxdrv/build_in_tmp" 46 BUILDVBOXNETFLT="/usr/share/%PACKAGE%/src/vboxnetflt/build_in_tmp" 45 47 fi 46 48 … … 137 139 running() 138 140 { 139 lsmod | grep -q "$ MODNAME[^_-]"141 lsmod | grep -q "$1[^_-]" 140 142 } 141 143 … … 143 145 { 144 146 begin_msg "Starting VirtualBox kernel module" 145 if ! running ; then147 if ! running vboxdrv; then 146 148 if ! find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then 147 149 failure "No suitable module for running kernel found" … … 150 152 failure "Cannot remove $DEVICE" 151 153 fi 152 if ! modprobe $MODNAME> /dev/null 2>&1; then153 failure "modprobe $MODNAMEfailed. Please use 'dmesg' to find out why"154 if ! modprobe vboxdrv > /dev/null 2>&1; then 155 failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why" 154 156 fi 155 157 sleep .2 … … 167 169 fi 168 170 if [ -z "$MAJOR" ]; then 169 rmmod $MODNAME2>/dev/null171 rmmod vboxdrv 2>/dev/null 170 172 failure "Cannot locate the VirtualBox device" 171 173 fi 172 174 if ! mknod -m 0660 $DEVICE c $MAJOR $MINOR 2>/dev/null; then 173 rmmod $MODNAME2>/dev/null175 rmmod vboxdrv 2>/dev/null 174 176 failure "Cannot create device $DEVICE with major $MAJOR and minor $MINOR" 175 177 fi … … 177 179 # ensure permissions 178 180 if ! chown :$GROUPNAME $DEVICE 2>/dev/null; then 179 rmmod $MODNAME 2>/dev/null 181 rmmod vboxnetflt 2>/dev/null 182 rmmod vboxdrv 2>/dev/null 180 183 failure "Cannot change owner $GROUPNAME for device $DEVICE" 181 184 fi 185 if [ -n "$NETFLT" ]; then 186 if ! modprobe vboxnetflt > /dev/null 2>&1; then 187 failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why" 188 fi 189 fi 182 190 succ_msg 183 191 } … … 186 194 { 187 195 begin_msg "Stopping VirtualBox kernel module" 188 if running; then 189 if ! rmmod $MODNAME 2>/dev/null; then 190 failure "Cannot unload module $MODNAME" 196 if running vboxdrv; then 197 if running vboxnetflt; then 198 if ! rmmod vboxnetflt 2>/dev/null; then 199 failure "Cannot unload module vboxnetflt" 200 fi 201 fi 202 if ! rmmod vboxdrv 2>/dev/null; then 203 failure "Cannot unload module vboxdrv" 191 204 fi 192 205 if ! rm -f $DEVICE; then … … 247 260 { 248 261 stop 262 if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then 263 begin_msg "Removing old VirtualBox netflt kernel module" 264 find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null 265 succ_msg 266 fi 249 267 if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then 250 begin_msg "Removing old VirtualBox kernel module"251 find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null252 succ_msg268 begin_msg "Removing old VirtualBox kernel module" 269 find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null 270 succ_msg 253 271 fi 254 272 begin_msg "Recompiling VirtualBox kernel module" 255 if ! $BUILDINTMP install > $LOG 2>&1; then 273 if ! $BUILDVBOXDRV \ 274 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 275 --no-print-directory install > $LOG 2>&1; then 256 276 failure "Look at $LOG to find out what went wrong" 277 fi 278 if [ -n "$NETFLT" ]; then 279 if ! $BUILDVBOXNETFLT \ 280 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 281 --no-print-directory install >> $LOG 2>&1; then 282 failure "Look at $LOG to find out what went wrong" 283 fi 257 284 fi 258 285 succ_msg … … 262 289 dmnstatus() 263 290 { 264 if running; then 265 echo "VirtualBox kernel module is loaded." 291 if running vboxdrv; then 292 if running vboxnetflt; then 293 echo "VirtualBox kernel modules (vboxdrv and vboxnetflt) are loaded." 294 else 295 echo "VirtualBox kernel module is loaded." 296 fi 266 297 for i in $SHUTDOWN_USERS; do 267 298 # don't create the ipcd directory with wrong permissions!
Note:
See TracChangeset
for help on using the changeset viewer.