#
# Copyright (C) 2006-2012 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.
#
# we can be called with the following arguments (6.5 of Debian policy):
# install: (our version): install our version
# upgrade: (our version): upgrade to our version
# abort-upgrade: (old version): upgrade to a new version failed
# defaults
if [ "$1" = "install" -o "$1" = "upgrade" ]; then
db_version 2.0
# check for active VMs
VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`
if [ -n "$VBOXSVC_PID" ]; then
# try graceful termination; terminate the ballon control service first
else
fi
fi
# try graceful termination; terminate the webservice first
else
fi
fi
kill -USR1 $VBOXSVC_PID
sleep 1
db_go || true
exit 1
fi
fi
# check for old installation
db_go || true
exit 1
fi
# we will remove that file in postinst
fi
# check for old vboxdrv modules
if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
# old modules found
if [ "$RET" = "false" ]; then
cat << EOF
Old vboxdrv kernel modules found in
EOF
cat << EOF
Removing of these modules denied by debconf setting
EOF
else
db_go || true
if [ "$RET" = "true" ]; then
fi
fi
fi
fi
fi # "$1" = "install" -o "$1" = "upgrade"
#DEBHELPER#