installer-utils.sh revision 09ed5ee011f3a6cd9d4742216ad3bb7dbf855641
# Oracle VM VirtualBox
# VirtualBox installer shell routines
#
# Copyright (C) 2007-2011 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
which "$@"
}
rm "$@"
}
eval 'my_which() { echo test_udev ; }'
eval 'my_rm() { true ; }'
eval 'test_udev() { echo "$TEST_UDEV_VERSION" ; }'
}
# install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) for distribution packages
VBOXDRV_GRP="$1"
VBOXDRV_MODE="$2"
INSTALLATION_DIR="$3"
udev_call=""
if [ $? -eq 0 ]; then
else
if [ $? -eq 0 ]; then
fi
fi
udev_fix="="
if [ "${udev_call}" != "" ]; then
udev_fix=""
fi
fi
# Write udev rules
echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\""
echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}\""
echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}=${udev_fix}\"usb_device\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}\""
echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\""
echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}=${udev_fix}\"usb_device\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\""
fi
# Remove old udev description file
if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then
fi
}
true
}
# install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) for distribution packages
usb_group=$1
udev_call=""
if [ $? -eq 0 ]; then
else
if [ $? -eq 0 ]; then
fi
fi
udev_fix="="
if [ "${udev_call}" != "" ]; then
udev_fix=""
fi
fi
echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\""
echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass} ${usb_group}\""
echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}=${udev_fix}\"usb_device\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass} ${usb_group}\""
echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"${usb_createnode} --remove \$major \$minor\""
echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}=${udev_fix}\"usb_device\", RUN=\"${usb_createnode} --remove \$major \$minor\""
fi
# Remove old udev description file
if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then
fi
}