VirtualBox

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

Last change on this file since 6359 was 6332, checked in by vboxsync, 17 years ago

sync deb

File size: 1.7 KB
Line 
1#!/bin/bash -e
2#
3# Copyright (C) 2006-2008 innotek GmbH
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 upgrade, disable this check for now
19if false; then
20 ver_new=%VER%
21 ver_old=`echo $2 | cut -f1 -d"-"`
22 if [ -n "$ver_old" -a "$ver_new" == "$ver_old" ]; then
23 db_get virtualbox-ose/update_version_change
24 db_input critical virtualbox-ose/update_version_change || true
25 db_go || true
26 db_get virtualbox-ose/update_version_change || true
27 if [ "$RET" = false ]; then
28 db_stop
29 exit 1
30 fi
31 fi
32fi
33
34# check for old vboxdrv modules
35if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
36 # old modules found
37 db_get virtualbox-ose/delete-old-modules
38 if [ "$RET" = "false" ]; then
39 cat << EOF
40Old vboxdrv kernel modules found in
41EOF
42 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g"
43 cat << EOF
44Removing of these modules denied by debconf setting
45EOF
46 else
47 db_input critical virtualbox-ose/delete-old-modules || true
48 db_go || true
49 db_get virtualbox-ose/delete-old-modules
50 if [ "$RET" = "true" ]; then
51 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
52 fi
53 fi
54fi
55
56#DEBHELPER#
57
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