1 | #!/bin/sh
|
---|
2 | # $Id: postrm 106061 2024-09-16 14:03:52Z vboxsync $
|
---|
3 | ## @file
|
---|
4 | # VirtualBox post remove.
|
---|
5 | #
|
---|
6 |
|
---|
7 | #
|
---|
8 | # Copyright (C) 2006-2024 Oracle and/or its affiliates.
|
---|
9 | #
|
---|
10 | # This file is part of VirtualBox base platform packages, as
|
---|
11 | # available from https://www.virtualbox.org.
|
---|
12 | #
|
---|
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 | #
|
---|
28 |
|
---|
29 | # we can be called with the following arguments (6.5 of Debian policy):
|
---|
30 | # remove: (our version): remove our package
|
---|
31 | # purge: (our version): purge our package
|
---|
32 | # upgrade: (our version): upgrade to a new version
|
---|
33 | # failed-upgrade (old version): failed to upgrade to a new version
|
---|
34 | # abort-install (our version): aborted install
|
---|
35 | # abort-upgrade (old version): aborted upgrade
|
---|
36 |
|
---|
37 | if [ "$1" = "purge" -a ! -f /etc/init.d/vboxdrv ] ; then
|
---|
38 | update-rc.d vboxdrv remove >/dev/null || exit $?
|
---|
39 | fi
|
---|
40 | if [ "$1" = "purge" -a ! -f /etc/init.d/vboxnet ] ; then
|
---|
41 | update-rc.d vboxnet remove >/dev/null || exit $?
|
---|
42 | fi
|
---|
43 | if [ "$1" = "purge" -a ! -f /etc/init.d/vboxweb-service ] ; then
|
---|
44 | update-rc.d vboxweb-service remove >/dev/null || exit $?
|
---|
45 | fi
|
---|
46 | if [ "$1" = "purge" -a ! -f /etc/init.d/vboxballoonctrl-service ] ; then
|
---|
47 | update-rc.d vboxballoonctrl-service remove >/dev/null || exit $?
|
---|
48 | fi
|
---|
49 |
|
---|
50 | # remove installed extension packs
|
---|
51 | if [ "$1" = "purge" ]; then
|
---|
52 | rm -rf /usr/lib/virtualbox/ExtensionPacks/*
|
---|
53 | fi
|
---|
54 |
|
---|
55 | #DEBHELPER#
|
---|
56 |
|
---|
57 | exit 0
|
---|