VirtualBox

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

Last change on this file since 12446 was 11975, checked in by vboxsync, 16 years ago

Solaris/installer: fixes.

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