postinst.in revision 87c50c527af59e43745475c4b8ac907c5f9bc204
#
# Copyright (C) 2006-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 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
#include installer-common.sh
# 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
# create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
if [ "$INSTALL_NO_GROUP" != "1" ]; then
db_go || true
fi
# install udev rule (disable with INSTALL_NO_UDEV=1 in
# 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/vboxballoonctrl/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/vboxballoonctrl-service" ]; then
else
fi
fi
if [ -x "/etc/init.d/vboxautostart-service" ]; then
else
fi
fi
if [ -x "/etc/init.d/vboxweb-service" ]; then
else
fi
fi
fi # $1 = "configure"
exit 0