VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/prerm-common.sh@ 58241

Last change on this file since 58241 was 58241, checked in by vboxsync, 9 years ago

Installer/linux (host): move kernel module building and clean-up to shared installer script.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1# Oracle VM VirtualBox
2# VirtualBox Linux pre-uninstaller common portions
3#
4
5# Copyright (C) 2015 Oracle Corporation
6#
7# This file is part of VirtualBox Open Source Edition (OSE), as
8# available from http://www.virtualbox.org. This file is free software;
9# you can redistribute it and/or modify it under the terms of the GNU
10# General Public License (GPL) as published by the Free Software
11# Foundation, in version 2 as it comes in the "COPYING" file of the
12# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14#
15
16# Put bits of the pre-uninstallation here which should work the same for all of
17# the Linux installers. We do not use special helpers (e.g. dh_* on Debian),
18# but that should not matter, as we know what those helpers actually do, and we
19# have to work on those systems anyway when installed using the all
20# distributions installer.
21#
22# We assume that all required files are in the same folder as this script
23# (e.g. /opt/VirtualBox, /usr/lib/VirtualBox, the build output directory).
24#
25# Script exit status: 0 on success, 1 if VirtualBox is running and can not be
26# stopped (installers may show an error themselves or just pass on standard
27# error).
28
29# This is GNU-specific, sorry Solaris.
30MY_PATH="$(dirname $(readlink -f -- "${0}"))/"
31cd "${MY_PATH}"
32. "./routines.sh"
33
34# Stop the ballon control service
35stop_init_script vboxballoonctrl-service 2>/dev/null
36# Stop the autostart service
37stop_init_script vboxautostart-service 2>/dev/null
38# Stop the web service
39stop_init_script vboxweb-service 2>/dev/null
40# Do this check here after we terminated the web service: check whether VBoxSVC
41# is running and exit if it can't be stopped.
42check_running
43# Terminate VBoxNetDHCP if running
44terminate_proc VBoxNetDHCP
45# Terminate VBoxNetNAT if running
46terminate_proc VBoxNetNAT
47delrunlevel vboxballoonctrl-service
48remove_init_script vboxballoonctrl-service
49delrunlevel vboxautostart-service
50remove_init_script vboxautostart-service
51delrunlevel vboxweb-service
52remove_init_script vboxweb-service
53# Stop kernel module and uninstall runlevel script
54stop_init_script vboxdrv 2>/dev/null
55delrunlevel vboxdrv
56remove_init_script vboxdrv
57# And do final clean-up
58"${MY_PATH}/vboxdrv.sh" cleanup
59# Stop host networking and uninstall runlevel script (obsolete)
60stop_init_script vboxnet 2>/dev/null
61delrunlevel vboxnet 2>/dev/null
62remove_init_script vboxnet 2>/dev/null
63rm -f /sbin/vboxconfig
64exit 0
Note: See TracBrowser for help on using the repository browser.

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