Changeset 37088 in vbox for trunk/src/VBox/Installer/linux/rpm
- Timestamp:
- May 13, 2011 9:17:29 PM (14 years ago)
- Location:
- trunk/src/VBox/Installer/linux/rpm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r37087 r37088 219 219 220 220 %post 221 #include installer-utils.sh 222 221 223 LOG="/var/log/vbox-install.log" 222 224 … … 236 238 237 239 # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) 238 if [ -d /etc/udev/rules.d -a "$INSTALL_NO_UDEV" != "1" ]; then 239 udev_call="" 240 udev_app=`which udevadm 2> /dev/null` 241 if [ $? -eq 0 ]; then 242 udev_call="${udev_app} version 2> /dev/null" 243 else 244 udev_app=`which udevinfo 2> /dev/null` 245 if [ $? -eq 0 ]; then 246 udev_call="${udev_app} -V 2> /dev/null" 247 fi 248 fi 249 udev_fix="=" 250 if [ "${udev_call}" != "" ]; then 251 udev_out=`${udev_call}` 252 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 253 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 254 udev_fix="" 255 fi 256 fi 257 usb_createnode="/usr/share/virtualbox/VBoxCreateUSBNode.sh" 258 echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \ 259 > /etc/udev/rules.d/10-vboxdrv.rules 260 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" \ 261 >> /etc/udev/rules.d/10-vboxdrv.rules 262 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" \ 263 >> /etc/udev/rules.d/10-vboxdrv.rules 264 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"${usb_createnode} --remove \$major \$minor\"" \ 265 >> /etc/udev/rules.d/10-vboxdrv.rules 266 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=\"${usb_createnode} --remove \$major \$minor\"" \ 267 >> /etc/udev/rules.d/10-vboxdrv.rules 268 fi 269 # Remove old udev description file 270 if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then 271 rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null 272 fi 240 install_udev_package vboxusers > /etc/udev/rules.d/10-vboxdrv.rules 241 273 242 # Build our device tree 274 243 for i in /sys/bus/usb/devices/*; do -
trunk/src/VBox/Installer/linux/rpm/rules
r36782 r37088 171 171 -e 's|%INSTMOD%|$(instmod)|g' \ 172 172 -e 's|%LIBASOUND%|$(if $(filter lib64,$(rpmlib)),libasound.so.2()(64bit),libasound.so.2)|g' \ 173 -e '/#include installer-utils.sh/ {' \ 174 -e "r $(vboxroot)/src/VBox/Installer/linux/installer-utils.sh" \ 175 -e 'd' \ 176 -e '}' \ 173 177 rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec 174 178 sed \
Note:
See TracChangeset
for help on using the changeset viewer.