VirtualBox

Ignore:
Timestamp:
Aug 11, 2011 4:59:14 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73466
Message:

Installer/linux/rpm, deb: share udev and device node installation between installers, and create the vboxusers group before we do that installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/debian/postinst.in

    r37124 r38423  
    4242  fi
    4343
    44   # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox)
    45   if [ "$INSTALL_NO_GROUP" != "1" ]; then
    46       usb_group=vboxusers
    47   else
    48       usb_group=root
    49   fi
    50   install_udev root 0600 /usr/share/virtualbox "${usb_group}" \
    51                "$INSTALL_NO_UDEV" > /etc/udev/rules.d/10-vboxdrv.rules
    52   # Build our device tree
    53   for i in /sys/bus/usb/devices/*; do
    54     if test -r "$i/dev"; then
    55       dev="`cat "$i/dev" 2> /dev/null`"
    56       major="`expr "$dev" : '\(.*\):' 2> /dev/null`"
    57       minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`"
    58       class="`cat $i/bDeviceClass 2> /dev/null`"
    59       sh ${usb_createnode} "$major" "$minor" "$class" ${usb_group} 2>/dev/null
    60     fi
    61   done
    62 
    6344  # create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
    6445  if [ "$INSTALL_NO_GROUP" != "1" ]; then
     
    6748    addgroup --system vboxusers || true
    6849  fi
     50
     51  # install udev rule (disable with INSTALL_NO_UDEV=1 in
     52  # /etc/default/virtualbox) and /dev/vboxdrv and /dev/vboxusb/*/* device nodes
     53  install_device_node_setup root 0600 /usr/share/virtualbox "${usb_group}"
    6954
    7055  # The starters need to be Suid root. They drop the privileges before starting
Note: See TracChangeset for help on using the changeset viewer.

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