Changeset 34572 in vbox
- Timestamp:
- Dec 1, 2010 2:23:21 PM (14 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/VBoxCreateUSBNode.sh
r34456 r34572 20 20 device=`expr "$2" '%' 128 + 1` 21 21 class="$3" 22 group="$4" 22 23 if test "$class" -eq 9; then 23 24 exit 0 … … 26 27 devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`" 27 28 if test "$do_remove" -eq 0; then 29 if test -z "$group"; then 30 group="vboxusers" 31 fi 28 32 mkdir /dev/vboxusb -m 0750 2>/dev/null 29 chown root: vboxusers/dev/vboxusb 2>/dev/null33 chown root:$group /dev/vboxusb 2>/dev/null 30 34 mkdir "$devdir" -m 0750 2>/dev/null 31 chown root: vboxusers"$devdir" 2>/dev/null35 chown root:$group "$devdir" 2>/dev/null 32 36 mknod "$devpath" c $1 $2 -m 0660 2>/dev/null 33 chown root: vboxusers"$devpath" 2>/dev/null37 chown root:$group "$devpath" 2>/dev/null 34 38 else 35 39 rm -f "$devpath" -
trunk/src/VBox/Installer/linux/debian
- Property svn:ignore
-
old new 19 19 virtualbox-*.debhelper 20 20 virtualbox-*.debhelper.log 21 virtualbox-*.sharedmimeinfo 21 22 wine.x86
-
- Property svn:ignore
-
trunk/src/VBox/Installer/linux/debian/postinst.in
r32517 r34572 63 63 > /etc/udev/rules.d/10-vboxdrv.rules 64 64 if [ "$INSTALL_NO_GROUP" != "1" ]; then 65 echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \ 66 >> /etc/udev/rules.d/10-vboxdrv.rules 67 echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \ 68 >> /etc/udev/rules.d/10-vboxdrv.rules 69 else 70 echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"root\", MODE=\"0664\"" \ 71 >> /etc/udev/rules.d/10-vboxdrv.rules 72 echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"root\", MODE=\"0664\"" \ 73 >> /etc/udev/rules.d/10-vboxdrv.rules 74 fi 65 usb_group=vboxusers 66 else 67 usb_group=root 68 fi 69 usb_createnode="/usr/share/virtualbox/VBoxCreateUSBNode.sh" 70 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" ${usb_group} \ 71 >> /etc/udev/rules.d/10-vboxdrv.rules 72 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" ${usb_group} \ 73 >> /etc/udev/rules.d/10-vboxdrv.rules 74 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=${usb_createnode} --remove \$major \$minor\"" \ 75 >> /etc/udev/rules.d/10-vboxdrv.rules 76 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=${usb_createnode} --remove \$major \$minor\"" \ 77 >> /etc/udev/rules.d/10-vboxdrv.rules 75 78 fi 76 79 # Remove old udev description file … … 78 81 rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null 79 82 fi 83 # Build our device tree 84 for i in /sys/bus/usb/devices/*; do 85 if test -r "$i/dev"; then 86 dev="`cat "$i/dev" 2> /dev/null`" 87 major="`expr "$dev" : '\(.*\):' 2> /dev/null`" 88 minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`" 89 class="`cat $i/bDeviceClass 2> /dev/null`" 90 sh ${usb_createnode} "$major" "$minor" "$class" ${usb_group} 2>/dev/null 91 fi 92 done 80 93 # Push the permissions to the USB device nodes. One of these should match. 81 94 # Rather nasty to use udevadm trigger for this, but I don't know of any -
trunk/src/VBox/Installer/linux/debian/rules
r34319 r34572 180 180 rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp 181 181 rm -f debian/virtualbox-*.substvars debian/virtualbox*.debhelper 182 rm -f debian/$(verpkg).mime 182 183 rm -rf $(builddir) $(moddir) 183 184 rm -rf debian/wine.* … … 204 205 $(prefix)/usr/share/applications/virtualbox.desktop) 205 206 install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps 207 install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor 208 cd $(archdir)/icons; for i in *; do \ 209 install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \ 210 mv $$i/* $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \ 211 rmdir $$i; \ 212 done 213 rmdir $(archdir)/icons 214 mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo 206 215 install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides 207 216 sed \ … … 234 243 install -D -g 0 -o 0 -m 644 debian/VBox.sh $(prefix)/usr/bin/VBox 235 244 mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package) 245 mv $(archdir)/VBoxCreateUSBNode.sh $(prefix)/usr/share/$(package) 236 246 for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \ 237 247 $(if $(NOQT),,VirtualBox) VBoxHeadless \ … … 309 319 dh_installchangelogs 310 320 dh_installmenu 321 dh_installmime 311 322 dh_link 312 323 ifeq ($(DEBUG),) -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r34563 r34572 67 67 install -m 755 -d $RPM_BUILD_ROOT/usr/share/applications 68 68 install -m 755 -d $RPM_BUILD_ROOT/usr/share/pixmaps 69 install -m 755 -d $RPM_BUILD_ROOT/usr/share/icons/hicolor 70 cd icons 71 for i in *; do 72 install -d -g 0 -o 0 $RPM_BUILD_ROOT/usr/share/icons/hicolor/$i/mimetypes 73 mv $i/* $(prefix)/usr/share/icons/hicolor/$i/mimetypes 74 rmdir $i 75 done 76 cd - 69 77 install -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/virtualbox 70 78 install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox … … 92 100 mv VBox.sh $RPM_BUILD_ROOT/usr/bin/VBox 93 101 mv VBoxSysInfo.sh $RPM_BUILD_ROOT/usr/share/virtualbox 102 mv VBoxCreateUSBNode.sh $RPM_BUILD_ROOT/usr/share/virtualbox 94 103 for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless vboxwebsrv webtest; do 95 104 mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done … … 224 233 fi 225 234 fi 235 usb_createnode="/usr/share/virtualbox/VBoxCreateUSBNode.sh" 226 236 echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \ 227 237 > /etc/udev/rules.d/10-vboxdrv.rules 228 echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \238 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" \ 229 239 >> /etc/udev/rules.d/10-vboxdrv.rules 230 echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \ 240 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" \ 241 >> /etc/udev/rules.d/10-vboxdrv.rules 242 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=${usb_createnode} --remove \$major \$minor\"" \ 243 >> /etc/udev/rules.d/10-vboxdrv.rules 244 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=${usb_createnode} --remove \$major \$minor\"" \ 231 245 >> /etc/udev/rules.d/10-vboxdrv.rules 232 246 fi … … 235 249 rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null 236 250 fi 251 # Build our device tree 252 for i in /sys/bus/usb/devices/*; do 253 if test -r "$i/dev"; then 254 dev="`cat "$i/dev" 2> /dev/null`" 255 major="`expr "$dev" : '\(.*\):' 2> /dev/null`" 256 minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`" 257 class="`cat $i/bDeviceClass 2> /dev/null`" 258 sh ${usb_createnode} "$major" "$minor" "$class" ${usb_group} 2>/dev/null 259 fi 260 done 237 261 # Push the permissions to the USB device nodes. One of these should match. 238 262 # Rather nasty to use udevadm trigger for this, but I don't know of any … … 411 435 /usr/share/pixmaps 412 436 /usr/share/virtualbox 437 /usr/share/icons
Note:
See TracChangeset
for help on using the changeset viewer.