postinstall.sh revision 69069b36d01e6c0e9965baca5fcb58d57a1030b6
af062818b47340eef15700d2f0211576ba3506eevboxsync# VirtualBox postinstall script for Solaris.
af062818b47340eef15700d2f0211576ba3506eevboxsync# Copyright (C) 2008-2010 Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync# available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync# you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync# General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
af062818b47340eef15700d2f0211576ba3506eevboxsync# The contents of this file may alternatively be used under the terms
af062818b47340eef15700d2f0211576ba3506eevboxsync# of the Common Development and Distribution License Version 1.0
af062818b47340eef15700d2f0211576ba3506eevboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync# VirtualBox OSE distribution, in which case the provisions of the
af062818b47340eef15700d2f0211576ba3506eevboxsync# CDDL are applicable instead of those of the GPL.
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync# You may elect to license modified versions of this file under the
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync# terms and conditions of either the GPL or the CDDL or both.
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync# uncompress(directory, file)
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync# Updates package metadata and uncompresses the file.
# Major version is S10, Minor version is no longer relevant (or used), use uname -v so it gets something
if test -f "$vboxadditions32_path/VBoxClient.Z" || test -f "$vboxadditions64_path/VBoxClient.Z"; then
if test -f "$vboxadditions32_path/VBoxClient.Z"; then
if test -f "$vboxadditions64_path/VBoxClient.Z"; then
# vboxguest.sh would've been installed, we just need to call it.
if test ! -z "$xorgbin"; then
if test -z "$xorgversion_long"; then
if test -z "$vboxmouse_src"; then
echo "Installing mouse and video drivers for X.Org $xorgversion..."
if test ! -d $vboxmouse32_dest_base; then
if test ! -d $vboxvideo32_dest_base; then
# We try to detect this by looking at bitness of "mouse_drv.so", and adjust our destination paths accordingly.
# We do not rely on using Xorg -version's ABI output because some builds (snv_162 iirc) have 64-bit ABI with
if test -f "$vboxmouse32_dest_base/mouse_drv.so"; then
echo "* Warning mouse_drv.so missing. Assuming Xorg ABI is 64-bit..."
if test -z "$bitsize"; then
if test ! -d $vboxmouse32_dest_base || test ! -d $vboxvideo32_dest_base || test ! -d $vboxmouse64_dest_base || test ! -d $vboxvideo64_dest_base; then
if test -f "$vboxadditions64_path/$vboxmouse_src"; then
# Some distros like Indiana have no xorg.conf, deal with this
# Xorg 1.3.x+ should use the modeline less Xorg confs while older should
if test -d "$vboxclient_dest"; then
/usr/sbin/installf -c none $PKGINST $vboxclient_dest/vboxclient.desktop=$vboxadditions_path/vboxclient.desktop s
if test -d "$vboxclient_dest"; then
/usr/sbin/installf -c none $PKGINST $vboxclient_dest/1099.vboxclient=$vboxadditions_path/1099.vboxclient s
if test -d "$vboxclient_dest"; then
/usr/sbin/installf -c none $PKGINST $vboxclient_dest/1099.vboxclient=$vboxadditions_path/1099.vboxclient s
# Move the appropriate module to kernel/fs & remove the unused module name from pkg and file from disk
if test -f "$vboxadditions64_path/$vboxfsmod"; then
if test -f "$vboxadditions32_path/$vboxfsmod"; then
# install openGL extensions for X.Org
if test ! -z "$xorgbin"; then
if test -f "/usr/lib/VBoxOGL.so"; then
if test -f "/usr/lib/amd64/VBoxOGL.so"; then
if test -x "$BOOTADMBIN"; then
echo "## $BOOTADMBIN not found/executable. Skipped explicit boot-archive update."
if test ! -z "$xorgbin"; then
exit $retval