VirtualBox

source: vbox/trunk/src/VBox/Installer/solaris/pkginstall.sh@ 105745

Last change on this file since 105745 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1#!/bin/sh
2# $Id: pkginstall.sh 98103 2023-01-17 14:15:46Z vboxsync $
3## @file
4#
5# VirtualBox postinstall script for Solaris.
6#
7# If you just installed VirtualBox using IPS/pkg(5), you should run this
8# script once to avoid rebooting the system before using VirtualBox.
9#
10
11#
12# Copyright (C) 2009-2023 Oracle and/or its affiliates.
13#
14# This file is part of VirtualBox base platform packages, as
15# available from https://www.virtualbox.org.
16#
17# This program is free software; you can redistribute it and/or
18# modify it under the terms of the GNU General Public License
19# as published by the Free Software Foundation, in version 3 of the
20# License.
21#
22# This program is distributed in the hope that it will be useful, but
23# WITHOUT ANY WARRANTY; without even the implied warranty of
24# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25# General Public License for more details.
26#
27# You should have received a copy of the GNU General Public License
28# along with this program; if not, see <https://www.gnu.org/licenses>.
29#
30# SPDX-License-Identifier: GPL-3.0-only
31#
32
33if test "$1" != "--srv4"; then
34 # IPS package
35 echo "Checking for older & partially installed bits..."
36 ISIPS="--ips"
37else
38 # SRv4 package
39 echo "Checking for older bits..."
40 ISIPS=""
41fi
42
43# pkgadd -v
44if test "$1" = "--sh-trace" || test "$2" = "--sh-trace" || test "$3" = "--sh-trace"; then
45 set -x
46fi
47DEBUGOPT=`set -o 2>/dev/null | sed -ne 's/^xtrace *on$/--sh-trace/p'` # propagate pkgadd -v
48
49# If PKG_INSTALL_ROOT is undefined or NULL, redefine to '/' and carry on.
50${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/vboxconfig.sh --preremove --fatal ${ISIPS} ${DEBUGOPT}
51
52if test "$?" -eq 0; then
53 echo "Installing new ones..."
54 $PKG_INSTALL_ROOT/opt/VirtualBox/vboxconfig.sh --postinstall ${DEBUGOPT}
55 rc=$?
56 if test "$rc" -ne 0; then
57 echo 1>&2 "## Completed but with errors."
58 rc=1
59 else
60 if test "$1" != "--srv4"; then
61 echo "Post installation completed successfully!"
62 fi
63 fi
64else
65 echo 1>&2 "## ERROR!! Failed to remove older/partially installed bits."
66 rc=1
67fi
68
69exit "$rc"
70
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