Changeset 63757 in vbox
- Timestamp:
- Sep 7, 2016 5:51:48 PM (8 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
-
HostDrivers/linux/load.sh (modified) (1 diff)
-
Installer/linux/vboxdrv.sh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/linux/load.sh
r58431 r63757 33 33 34 34 # Unload, but keep the udev rules. 35 sudo "${MY_DIR}/vboxdrv.sh" stop _keep_udev35 sudo "${MY_DIR}/vboxdrv.sh" stop 36 36 37 37 if [ -z "${OPT_UNLOAD_ONLY}" ]; then -
trunk/src/VBox/Installer/linux/vboxdrv.sh
r62730 r63757 186 186 187 187 ## Install udev rules and create device nodes for usb access 188 install_device_node_setup() {188 setup_usb() { 189 189 VBOXDRV_GRP="$1" # The group that should own /dev/vboxdrv 190 190 VBOXDRV_MODE="$2" # The mode to be used for /dev/vboxdrv … … 213 213 } 214 214 215 cleanup_usb() 216 { 217 # Remove udev description file 218 rm -f /etc/udev/rules.d/60-vboxdrv.rules 219 rm -f /etc/udev/rules.d/10-vboxdrv.rules 220 221 # Remove our USB device tree 222 rm -rf /dev/vboxusb 223 } 224 215 225 start() 216 226 { 217 227 begin_msg "Starting VirtualBox services" console 218 # Create udev rule and USB device nodes.219 ## todo Wouldn't it make more sense to install the rule to /lib/udev? This220 ## is not a user-created configuration file after all.221 ## todo Do we need a udev rule to create /dev/vboxdrv[u] at all? We have222 ## working fall-back code here anyway, and the "right" code is more complex223 ## than the fall-back. Unnecessary duplication?224 install_device_node_setup "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR"225 228 if [ -d /proc/xen ]; then 226 229 failure "Running VirtualBox in a Xen environment is not supported" … … 286 289 stop() 287 290 { 288 if test ${#} -eq 0 || ! test "${1}" = "--keep-udev"; then 289 begin_msg "Stopping VirtualBox services" console 290 291 # Remove udev description file 292 rm -f /etc/udev/rules.d/60-vboxdrv.rules 293 rm -f /etc/udev/rules.d/10-vboxdrv.rules 294 295 # Remove our USB device tree 296 rm -rf /dev/vboxusb 297 else 298 begin_msg "Stopping VirtualBox services (keeping udev + usb)" console 299 fi 291 begin_msg "Stopping VirtualBox services" console 300 292 301 293 if running vboxpci; then … … 471 463 stop_vms 472 464 ;; 473 stop_keep_udev)474 # This is used by src/VBox/HostDrivers/linux/load.sh.475 stop_vms476 stop --keep-udev477 ;;478 465 restart) 479 466 stop && start 480 467 ;; 481 468 setup) 469 # Create udev rule and USB device nodes. 470 ## todo Wouldn't it make more sense to install the rule to /lib/udev? This 471 ## is not a user-created configuration file after all. 472 ## todo Do we need a udev rule to create /dev/vboxdrv[u] at all? We have 473 ## working fall-back code here anyway, and the "right" code is more complex 474 ## than the fall-back. Unnecessary duplication? 475 setup_usb "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR" 482 476 setup && start 483 477 ;; 484 478 cleanup) 485 479 stop && cleanup 480 cleanup_usb 486 481 ;; 487 482 force-reload)
Note:
See TracChangeset
for help on using the changeset viewer.

