VirtualBox

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

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

Export attribs for Additions/solaris.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1#!/bin/sh
2# innotek VirtualBox
3# VirtualBox postinstall script for Solaris.
4#
5# Copyright (C) 2008 innotek GmbH
6#
7# innotek GmbH confidential
8# All rights reserved
9#
10
11echo "innotek VirtualBox Guest Additions - postinstall script"
12echo "This script will setup and load the VirtualBox Guest kernel module..."
13
14sync
15vboxadditions_path="/opt/VirtualBoxAdditions"
16
17# vboxguest.sh would've been installed, we just need to call it.
18$vboxadditions_path/vboxguest.sh restart silentunload
19
20# suid permissions for timesync
21echo "Setting permissions..."
22chmod 04755 $vboxadditions_path/VBoxService
23
24# create links
25echo "Creating links..."
26/usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s
27/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient=$vboxadditions_path/VBoxClient s
28/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxService=$vboxadditions_path/VBoxService s
29
30# Install Xorg components to the required places
31xorgversion_long=`/usr/bin/X11/Xorg -version 2>&1 | grep "X Window System Version"`
32xorgversion=`/usr/bin/expr "${xorgversion_long}" : 'X Window System Version \([^ ]*\)'`
33
34vboxmouse_src=""
35vboxvideo_src=""
36
37case "$xorgversion" in
38 1.3.* )
39 vboxmouse_src="$vboxadditions_path/vboxmouse_drv_71.so"
40 vboxvideo_src="$vboxadditions_path/vboxvideo_drv_13.so"
41 ;;
42 1.4.* )
43 vboxmouse_src="$vboxadditions_path/vboxmouse_drv_14.so"
44 vboxvideo_src="$vboxadditions_path/vboxvideo_drv_14.so"
45 ;;
46 7.1.* | *7.2.* )
47 vboxmouse_src="$vboxadditions_path/vboxmouse_drv_71.so"
48 vboxvideo_src="$vboxadditions_path/vboxvideo_drv_71.so"
49 ;;
50 6.9.* | 7.0.* )
51 vboxmouse_src="$vboxadditions_path/vboxmouse_drv_70.so"
52 vboxvideo_src="$vboxadditions_path/vboxvideo_drv_70.so"
53 ;;
54esac
55
56if test -z "$vboxmouse_src"; then
57 echo "Unknown version of the X Window System installed."
58 echo "Failed to install the VirtualBox X Window System drivers."
59else
60 vboxmouse_dest="/usr/lib/X11/modules/input/vboxmouse_drv.so"
61 vboxvideo_dest="/usr/lib/X11/modules/input/vboxvideo_drv.so"
62 /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f
63 /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f
64 cp "$vboxmouse_src" "$vboxmouse_dest"
65 cp "$vboxvideo_src" "$vboxvideo_dest"
66 echo "Installed VirtualBox mouse and video drivers for Xorg $xorgversion"
67
68 # Removing redudant files
69 /usr/sbin/removef $PKGINST $vboxadditions_path/vboxmouse_drv_* 1>/dev/null 2>/dev/null
70 /usr/sbin/removef $PKGINST $vboxadditions_path/vboxvideo_drv_* 1>/dev/null 2>/dev/null
71 rm -f $vboxadditions_path/vboxmouse_drv_*
72 rm -f $vboxadditions_path/vboxvideo_drv_*
73 /usr/sbin/removef -f $PKGINST
74fi
75
76echo "Configuring Xorg..."
77$vboxadditions_path/x11config.pl
78
79/usr/sbin/installf -f $PKGINST
80
81# Setup our VBoxService SMF service
82echo "Configuring service..."
83
84/usr/sbin/svccfg import /var/svc/manifest/system/virtualbox/vboxservice.xml
85/usr/sbin/svcadm enable svc:/system/virtualbox/vboxservice
86
87echo "Done."
88
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