VirtualBox

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

Last change on this file since 11923 was 11923, checked in by vboxsync, 17 years ago

Solaris/installer: Added the bits for vboxnetflt.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 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
34
35 echo "Configuring VirtualBox NetFilter kernel module..."
36 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then
37 /opt/VirtualBox/vboxdrv.sh fltrestart silentunload
38 fi
39fi
40
41# create links
42echo "Creating links..."
43if test -f /opt/VirtualBox/VirtualBox; then
44 /usr/sbin/installf -c none $PKGINST /usr/bin/VirtualBox=/opt/VirtualBox/VBox.sh s
45 # Qt links
46 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxQtconfig=/opt/VirtualBox/VBox.sh s
47fi
48/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxManage=/opt/VirtualBox/VBox.sh s
49/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxSDL=/opt/VirtualBox/VBox.sh s
50if test -f /opt/VirtualBox/VBoxHeadless; then
51 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxHeadless=/opt/VirtualBox/VBox.sh s
52 if test -f /opt/VirtualBox/VBoxVRDP.so; then
53 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxVRDP=/opt/VirtualBox/VBox.sh s
54 fi
55fi
56if test -f /var/svc/manifest/application/virtualbox/webservice.xml; then
57 /usr/sbin/svccfg import /var/svc/manifest/application/virtualbox/webservice.xml
58 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice:default
59fi
60/usr/sbin/removef $PKGINST /opt/VirtualBox/etc/devlink.tab 1>/dev/null
61/usr/sbin/removef $PKGINST /opt/VirtualBox/etc 1>/dev/null
62rm -rf /opt/VirtualBox/etc
63/usr/sbin/removef -f $PKGINST
64
65/usr/sbin/installf -f $PKGINST
66
67# We need to touch the desktop link in order to add it to the menu right away
68if test "$currentzone" = "global"; then
69 if test -f "/usr/share/applications/virtualbox.desktop"; then
70 touch /usr/share/applications/virtualbox.desktop
71 fi
72
73 # create /dev link for vboxdrv (only possible from global zone)
74 /usr/sbin/devfsadm -i vboxdrv
75fi
76
77echo "Done."
78
79# return 20 = requires reboot, 2 = partial failure, 0 = success
80exit 0
81
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