1 | #!/bin/sh
|
---|
2 | ## @file
|
---|
3 | # Sun VirtualBox - VirtualBox postinstall script for Solaris.
|
---|
4 | #
|
---|
5 | # If you just installed VirtualBox using IPS/pkg(5), you should run this
|
---|
6 | # script once to avoid rebooting the system before using VirtualBox.
|
---|
7 | #
|
---|
8 |
|
---|
9 | #
|
---|
10 | # Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
11 | #
|
---|
12 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
13 | # available from http://www.virtualbox.org. This file is free software;
|
---|
14 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
15 | # General Public License (GPL) as published by the Free Software
|
---|
16 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
17 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
18 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
19 | #
|
---|
20 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
21 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
22 | # additional information or have any questions.
|
---|
23 | #
|
---|
24 |
|
---|
25 | if test "$1" != "--srv4"; then
|
---|
26 | # IPS package
|
---|
27 | echo "Checking for older & partially installed bits..."
|
---|
28 | ISIPS="--ips"
|
---|
29 | else
|
---|
30 | # SRv4 package
|
---|
31 | echo "Checking for older bits..."
|
---|
32 | ISIPS=""
|
---|
33 | fi
|
---|
34 |
|
---|
35 | /opt/VirtualBox/vboxconfig.sh --preremove --fatal "$ISIPS"
|
---|
36 |
|
---|
37 | if test "$?" -eq 0; then
|
---|
38 | echo "Installing new ones..."
|
---|
39 | /opt/VirtualBox/vboxconfig.sh --postinstall
|
---|
40 | rc=$?
|
---|
41 | if test "$rc" -ne 0; then
|
---|
42 | echo "Completed but with errors."
|
---|
43 | rc=20
|
---|
44 | else
|
---|
45 | if test "$1" != "--srv4"; then
|
---|
46 | echo "Post installation completed successfully!"
|
---|
47 | fi
|
---|
48 | fi
|
---|
49 | else
|
---|
50 | echo "## ERROR!! Failed to remove older/partially installed bits."
|
---|
51 | rc=1
|
---|
52 | fi
|
---|
53 |
|
---|
54 | exit "$rc"
|
---|
55 |
|
---|