postinst.in revision c48c4d769ded37e2496f97dddbbd36dc62f244b1
#
# Copyright (C) 2006-2010 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 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.
#
# we can be called with the following arguments (6.5 of Debian policy):
# configure: (our version): installing/configuring new version
# abort-upgrade: (old version): upgrading to a new version failed
# abort-remove: (our version): removing this package failed
# abort-deconfigure: (our version): error during resolving conflicts
# defaults
if [ "$1" = "configure" ]; then
# for debconf
db_version 2.0
# remove old cruft
echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
fi
fi
# install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox)
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\"" \
if [ "$INSTALL_NO_GROUP" != "1" ]; then
else
fi
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}==\"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}==\"usb_device\", RUN=${usb_createnode} --remove \$major \$minor\"" \
fi
# Remove old udev description file
fi
# Build our device tree
fi
done
# create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
if [ "$INSTALL_NO_GROUP" != "1" ]; then
db_go || true
fi
# The starters need to be Suid root. They drop the privileges before starting
# the real frontend.
fi
fi
fi
fi
fi
# if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules
if [ "$INSTALL_NO_VBOXDRV" = "1" ]; then
fi
fi # $1 = "configure"
#DEBHELPER#
if [ "$1" = "configure" ]; then
# Start vboxdrv/vboxweb-service manually as we use our own error handling in postrm
# Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox
if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
if [ "$RET" = "false" ]; then
cat << EOF
Unable to find a precompiled module for the current kernel
though module compilation denied by debconf setting.
EOF
else
db_go || true
if [ "$RET" = "true" ]; then
fi
fi
fi
fi
else
fi
else
# shipped modules found, register sources at DKMS anyway
fi
if [ -n "$DKMS" ]; then
fi
fi
else
fi
fi
fi
if [ -x "/etc/init.d/vboxweb-service" ]; then
else
fi
fi
fi # $1 = "configure"
exit 0