VirtualBox

source: vbox/trunk/src/VBox/Installer/solaris/postinstall.sh@ 11836

Last change on this file since 11836 was 11725, checked in by vboxsync, 16 years ago

#3076: Merged in the branch with the alternate driver authentication method. (34468:HEAD)

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1#!/bin/sh
2## @file
3# Sun xVM VirtualBox
4# VirtualBox postinstall script for Solaris.
5#
6
7#
8# Copyright (C) 2007-2008 Sun Microsystems, Inc.
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19# Clara, CA 95054 USA or visit http://www.sun.com if you need
20# additional information or have any questions.
21#
22
23# Check for xVM/Xen
24currentisa=`uname -i`
25if test "$currentisa" = "i86xpv"; then
26 echo "## VirtualBox cannot run under xVM Dom0! Fatal Error, Aborting installation!"
27 exit 2
28fi
29
30currentzone=`zonename`
31if test "$currentzone" = "global"; then
32 echo "Configuring VirtualBox kernel module..."
33 /opt/VirtualBox/vboxdrv.sh restart silentunload
34fi
35
36# create links
37echo "Creating links..."
38if test -f /opt/VirtualBox/VirtualBox; then
39 /usr/sbin/installf -c none $PKGINST /usr/bin/VirtualBox=/opt/VirtualBox/VBox.sh s
40 # Qt links
41 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxQtconfig=/opt/VirtualBox/VBox.sh s
42fi
43/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxManage=/opt/VirtualBox/VBox.sh s
44/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxSDL=/opt/VirtualBox/VBox.sh s
45if test -f /opt/VirtualBox/VBoxHeadless; then
46 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxHeadless=/opt/VirtualBox/VBox.sh s
47 if test -f /opt/VirtualBox/VBoxVRDP.so; then
48 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxVRDP=/opt/VirtualBox/VBox.sh s
49 fi
50fi
51if test -f /var/svc/manifest/application/virtualbox/webservice.xml; then
52 /usr/sbin/svccfg import /var/svc/manifest/application/virtualbox/webservice.xml
53 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice:default
54fi
55/usr/sbin/removef $PKGINST /opt/VirtualBox/etc/devlink.tab 1>/dev/null
56/usr/sbin/removef $PKGINST /opt/VirtualBox/etc 1>/dev/null
57rm -rf /opt/VirtualBox/etc
58/usr/sbin/removef -f $PKGINST
59
60/usr/sbin/installf -f $PKGINST
61
62# We need to touch the desktop link in order to add it to the menu right away
63if test "$currentzone" = "global"; then
64 if test -f "/usr/share/applications/virtualbox.desktop"; then
65 touch /usr/share/applications/virtualbox.desktop
66 fi
67
68 # create /dev link for vboxdrv (only possible from global zone)
69 /usr/sbin/devfsadm -i vboxdrv
70fi
71
72echo "Done."
73
74# return 20 = requires reboot, 2 = partial failure, 0 = success
75exit 0
76
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