VirtualBox

Changeset 37339 in vbox


Ignore:
Timestamp:
Jun 7, 2011 9:40:34 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72101
Message:

Installer/linux: adjustments to the USB device node creation script and fix a warning due to the missing class parameter when removing devices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/VBoxCreateUSBNode.sh

    r34726 r37339  
    1818#
    1919
     20# Constant, from the USB specifications
     21usb_class_hub=9
     22
    2023do_remove=0
    2124case "$1" in "--remove")
     
    2629class="$3"
    2730group="$4"
    28 if test "$class" -eq 9; then
    29   exit 0
    30 fi
    3131devdir="`printf "/dev/vboxusb/%.3d" $bus`"
    3232devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`"
    33 if test "$do_remove" -eq 0; then
    34   if test -z "$group"; then
    35     group="vboxusers"
    36   fi
     33case "$do_remove" in
     34  0)
     35  case "$class" in "$usb_class_hub") exit 0;; esac
     36  case "$group" in "") group="vboxusers";; esac
    3737  mkdir /dev/vboxusb -m 0750 2>/dev/null
    3838  chown root:$group /dev/vboxusb 2>/dev/null
     
    4141  mknod "$devpath" c $1 $2 -m 0660 2>/dev/null
    4242  chown root:$group "$devpath" 2>/dev/null
    43 else
     43  ;;
     44  1)
    4445  rm -f "$devpath"
    45 fi
     46  ;;
     47esac
    4648
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette