VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/postinst-common.sh@ 57984

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

Installers/linux: drop DKMS support.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1# Oracle VM VirtualBox
2# VirtualBox Linux post-installer 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# Put bits of the post-installation here which should work the same for all of
16# the Linux installers. We do not use special helpers (e.g. dh_* on Debian),
17# but that should not matter, as we know what those helpers actually do, and we
18# have to work on those systems anyway when installed using the all
19# distributions installer.
20#
21# We assume that all required files are in the same folder as this script
22# (e.g. /opt/VirtualBox, /usr/lib/VirtualBox, the build output directory).
23
24# This is GNU-specific, sorry Solaris.
25MY_PATH="$(dirname $(readlink -f -- "${0}"))/"
26cd "${MY_PATH}"
27. "./routines.sh"
28
29START=
30TARGET=
31for i in "$@"
32do
33 case "${i}" in
34 --start)
35 START=true
36 ;;
37 *)
38 if test -z "${TARGET}" && test -d "${i}"; then
39 TARGET="${i}"
40 else
41 echo "Bad argument ${i}" >&2
42 exit 1
43 fi
44 ;;
45 esac
46done
47
48if test -z "${TARGET}"; then
49 echo "$0: no installation target specified." >&2
50 exit 1
51fi
52
53# Remove any traces of DKMS from previous installations.
54for i in vboxhost vboxdrv vboxnetflt vboxnetadp; do
55 rm -rf "/var/lib/dkms/${i}"*
56done
57
58# Install runlevel scripts and systemd unit files
59install_init_script "${TARGET}/vboxdrv.sh" vboxdrv
60install_init_script "${TARGET}/vboxballoonctrl-service.sh" vboxballoonctrl-service
61install_init_script "${TARGET}/vboxautostart-service.sh" vboxautostart-service
62install_init_script "${TARGET}/vboxweb-service.sh" vboxweb-service
63
64delrunlevel vboxdrv
65addrunlevel vboxdrv
66delrunlevel vboxballoonctrl-service
67addrunlevel vboxballoonctrl-service
68delrunlevel vboxautostart-service
69addrunlevel vboxautostart-service
70delrunlevel vboxweb-service
71addrunlevel vboxweb-service
72
73test -n "${START}" &&
74{
75 start_init_script vboxdrv
76 start_init_script vboxballoonctrl-service
77 start_init_script vboxautostart-service
78 start_init_script vboxweb-service
79}
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