Changeset 37124 in vbox
- Timestamp:
- May 17, 2011 11:26:00 AM (14 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/debian/postinst.in
r37088 r37124 48 48 usb_group=root 49 49 fi 50 install_udev_package ${usb_group} > /etc/udev/rules.d/10-vboxdrv.rules 50 install_udev root 0600 /usr/share/virtualbox "${usb_group}" \ 51 "$INSTALL_NO_UDEV" > /etc/udev/rules.d/10-vboxdrv.rules 51 52 # Build our device tree 52 53 for i in /sys/bus/usb/devices/*; do -
trunk/src/VBox/Installer/linux/install.sh
r37088 r37124 443 443 444 444 # Create udev description file 445 install_udev _run"$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \445 install_udev "$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \ 446 446 > /etc/udev/rules.d/10-vboxdrv.rules 447 447 -
trunk/src/VBox/Installer/linux/installer-utils.sh
r37123 r37124 50 50 } 51 51 52 install_udev _run() {52 install_udev() { 53 53 # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) for distribution packages 54 54 VBOXDRV_GRP="$1" # The group owning the vboxdrv device … … 113 113 DELETED_UDEV_FILE="" 114 114 } 115 116 install_udev_package() {117 # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) for distribution packages118 usb_group=$1119 install_udev_run root 0600 /usr/share/virtualbox "${usb_group}" \120 "$INSTALL_NO_UDEV"121 } -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r37088 r37124 238 238 239 239 # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) 240 install_udev_package vboxusers > /etc/udev/rules.d/10-vboxdrv.rules 240 install_udev root 0600 /usr/share/virtualbox vboxusers "$INSTALL_NO_UDEV" \ 241 > /etc/udev/rules.d/10-vboxdrv.rules 241 242 242 243 # Build our device tree -
trunk/src/VBox/Installer/linux/testcase/tstInstallerLinux.sh
r37123 r37124 20 20 CERRS=0 21 21 22 echo "Testing udev rule generation for the \".run\" installer"22 echo "Testing udev rule generation" 23 23 24 24 setup_test_input_install_udev ".run, udev-59" 59 … … 32 32 UDEV_END` 33 33 34 install_udev_output="`install_udev _runvboxusers 0660 /opt/VirtualBox`"34 install_udev_output="`install_udev vboxusers 0660 /opt/VirtualBox`" 35 35 case "$install_udev_output" in 36 36 "$udev_59_rules") ;; … … 52 52 UDEV_END` 53 53 54 install_udev_output="`install_udev _runvboxusers 0660 /opt/VirtualBox`"54 install_udev_output="`install_udev vboxusers 0660 /opt/VirtualBox`" 55 55 case "$install_udev_output" in 56 56 "$udev_55_rules") ;; … … 72 72 UDEV_END` 73 73 74 install_udev_output="`install_udev _runroot 0600 /usr/lib/virtualbox`"74 install_udev_output="`install_udev root 0600 /usr/lib/virtualbox`" 75 75 case "$install_udev_output" in 76 76 "$udev_54_rules") ;; … … 86 86 cleanup_test_input_install_udev 87 87 88 echo "Testing udev rule generation for the \"package\" installer"89 90 setup_test_input_install_udev "package, udev-59" 5991 92 udev_59_rules=`cat <<'UDEV_END'93 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"94 SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"95 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"96 SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"97 SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"98 UDEV_END`99 100 install_udev_output="`install_udev_package vboxusers`"101 case "$install_udev_output" in102 "$udev_59_rules") ;;103 *)104 echo "Bad output for udev version 59. Expected:"105 echo "$udev_59_rules"106 echo "Actual:"107 echo "$install_udev_output"108 CERRS="`expr "$CERRS" + 1`"109 ;;110 esac111 112 cleanup_test_input_install_udev113 114 setup_test_input_install_udev "package, udev-55" 55115 116 udev_55_rules=`cat <<'UDEV_END'117 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"118 UDEV_END`119 120 install_udev_output="`install_udev_package vboxusers`"121 case "$install_udev_output" in122 "$udev_55_rules") ;;123 *)124 echo "Bad output for udev version 55. Expected:"125 echo "$udev_55_rules"126 echo "Actual:"127 echo "$install_udev_output"128 CERRS="`expr "$CERRS" + 1`"129 ;;130 esac131 132 cleanup_test_input_install_udev133 134 setup_test_input_install_udev "package, udev-54" 54135 136 udev_54_rules=`cat <<'UDEV_END'137 KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"138 UDEV_END`139 140 install_udev_output="`install_udev_package root`"141 case "$install_udev_output" in142 "$udev_54_rules") ;;143 *)144 echo "Bad output for udev version 54. Expected:"145 echo "$udev_54_rules"146 echo "Actual:"147 echo "$install_udev_output"148 CERRS="`expr "$CERRS" + 1`"149 ;;150 esac151 152 cleanup_test_input_install_udev153 154 setup_test_input_install_udev "package, no udev" 54155 INSTALL_NO_UDEV=1156 157 install_udev_output="`install_udev_package root`"158 case "$install_udev_output" in159 "") ;;160 *)161 echo "Bad output for udev version 54. Expected:"162 echo "$udev_54_rules"163 echo "Actual:"164 echo "$install_udev_output"165 CERRS="`expr "$CERRS" + 1`"166 ;;167 esac168 169 cleanup_test_input_install_udev170 INSTALL_NO_UDEV=171 172 88 echo "Done. Error count $CERRS."
Note:
See TracChangeset
for help on using the changeset viewer.