[32030] | 1 | #!/bin/sh
|
---|
[82441] | 2 | # $Id: prerm 98103 2023-01-17 14:15:46Z vboxsync $
|
---|
| 3 | ## @file
|
---|
| 4 | # VirtualBox pre-removal.
|
---|
| 5 | #
|
---|
[32030] | 6 |
|
---|
| 7 | #
|
---|
[98103] | 8 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[32030] | 9 | #
|
---|
[96407] | 10 | # This file is part of VirtualBox base platform packages, as
|
---|
| 11 | # available from https://www.virtualbox.org.
|
---|
[32030] | 12 | #
|
---|
[96407] | 13 | # This program is free software; you can redistribute it and/or
|
---|
| 14 | # modify it under the terms of the GNU General Public License
|
---|
| 15 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 16 | # License.
|
---|
| 17 | #
|
---|
| 18 | # This program is distributed in the hope that it will be useful, but
|
---|
| 19 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 21 | # General Public License for more details.
|
---|
| 22 | #
|
---|
| 23 | # You should have received a copy of the GNU General Public License
|
---|
| 24 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 25 | #
|
---|
| 26 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 27 | #
|
---|
[32030] | 28 |
|
---|
| 29 | # we can be called with the following arguments (6.5 of Debian policy):
|
---|
| 30 | # upgrade: (new version): upgrade to a new version
|
---|
| 31 | # failed-upgrade: (our version): failed to upgrade
|
---|
| 32 | # remove: (our version): remove this package
|
---|
| 33 | # deconfigure: (our version): removing conflicting version
|
---|
| 34 |
|
---|
[48810] | 35 | rm -f /etc/udev/rules.d/60-vboxdrv.rules
|
---|
[32030] | 36 | rm -f /etc/vbox/license_agreed
|
---|
| 37 | rm -f /etc/vbox/module_not_compiled
|
---|
| 38 |
|
---|
| 39 | # defaults
|
---|
| 40 | [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
---|
| 41 |
|
---|
[82441] | 42 | . /usr/share/debconf/confmodule
|
---|
| 43 | db_version 2.0
|
---|
| 44 | db_capb backup
|
---|
[32030] | 45 |
|
---|
[82441] | 46 | if ! /usr/lib/virtualbox/prerm-common.sh > /dev/null 2>&1; then
|
---|
| 47 | if [ "$1" != "failed-upgrade" ]; then
|
---|
| 48 | db_fset virtualbox/old-running seen false || true
|
---|
| 49 | db_input critical virtualbox/old-running || true
|
---|
| 50 | db_go || true
|
---|
[32030] | 51 | fi
|
---|
[82441] | 52 | exit 1
|
---|
[32030] | 53 | fi
|
---|
| 54 |
|
---|
| 55 | #DEBHELPER#
|
---|
| 56 |
|
---|
| 57 | exit 0
|
---|