VirtualBox

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

Last change on this file since 57812 was 57712, checked in by vboxsync, 10 years ago

Installer/linux: refactored service script handling to external, hopefully installer-type agnostic scripts. Missing files.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 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# Install runlevel scripts and systemd unit files
54install_init_script "${TARGET}/vboxdrv.sh" vboxdrv
55install_init_script "${TARGET}/vboxballoonctrl-service.sh" vboxballoonctrl-service
56install_init_script "${TARGET}/vboxautostart-service.sh" vboxautostart-service
57install_init_script "${TARGET}/vboxweb-service.sh" vboxweb-service
58
59delrunlevel vboxdrv
60addrunlevel vboxdrv
61delrunlevel vboxballoonctrl-service
62addrunlevel vboxballoonctrl-service
63delrunlevel vboxautostart-service
64addrunlevel vboxautostart-service
65delrunlevel vboxweb-service
66addrunlevel vboxweb-service
67
68test -n "${START}" &&
69{
70 start_init_script vboxdrv
71 start_init_script vboxballoonctrl-service
72 start_init_script vboxautostart-service
73 start_init_script vboxweb-service
74}
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