VirtualBox

source: vbox/trunk/debian/preinst.in@ 23027

Last change on this file since 23027 was 13540, checked in by vboxsync, 16 years ago

sync debian/ directory

File size: 1.6 KB
Line 
1#!/bin/bash -e
2#
3# Copyright (C) 2006-2008 Sun Microsystems, Inc.
4#
5# This file is part of VirtualBox Open Source Edition (OSE), as
6# available from http://www.virtualbox.org. This file is free software;
7# you can redistribute it and/or modify it under the terms of the GNU
8# General Public License as published by the Free Software Foundation,
9# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
10# distribution. VirtualBox OSE is distributed in the hope that it will
11# be useful, but WITHOUT ANY WARRANTY of any kind.
12#
13
14. /usr/share/debconf/confmodule
15db_version 2.0
16db_capb backup
17
18# check for old installation
19if [ -r /etc/vbox/vbox.cfg ]; then
20 . /etc/vbox/vbox.cfg
21 if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then
22 db_fset virtualbox/old-installation-found seen false || true
23 db_input high virtualbox/old-installation-found || true
24 db_go || true
25 exit 1
26 fi
27 # we will remove that file in postinst
28fi
29
30# check for old vboxdrv modules
31if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
32 # old modules found
33 db_get virtualbox/delete-old-modules || true
34 if [ "$RET" = "false" ]; then
35 cat << EOF
36Old vboxdrv kernel modules found in
37EOF
38 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g"
39 cat << EOF
40Removing of these modules denied by debconf setting
41EOF
42 else
43 db_input critical virtualbox/delete-old-modules || true
44 db_go || true
45 db_get virtualbox/delete-old-modules || true
46 if [ "$RET" = "true" ]; then
47 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
48 fi
49 fi
50fi
51
52#DEBHELPER#
53
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette