postinstall.sh revision a2f6500ea77004e215d6fc8fcdab25b1d4d1ad3d
0N/A# available from http://www.virtualbox.org. This file is free software;
0N/A# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0N/Aif test -f "$vboxadditions32_path/VBoxClient.Z" || test -f "$vboxadditions64_path/VBoxClient.Z"; then
0N/A if test -f "$vboxadditions32_path/VBoxClient.Z"; then
146N/A if test -f "$vboxadditions64_path/VBoxClient.Z"; then
146N/A # vboxguest.sh would've been installed, we just need to call it.
0N/A /usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s
146N/A if test -z "$xorgversion_long"; then
0N/A if test -z "$vboxvideo_src"; then
0N/A elif test ! -f "$vboxadditions32_path/$vboxvideo_src" && test ! -f "$vboxadditions64_path/$vboxvideo_src"; then
0N/A echo "*** $vboxadditions32_path/$vboxvideo_src or $vboxadditions64_path/$vboxvideo_src not found!"
0N/A echo "Installing video driver for X.Org $xorgversion..."
if test ! -d $vboxvideo32_dest_base; then
# We try to detect this by looking at bitness of "vesa_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 "$vboxvideo32_dest_base/vesa_drv.so"; then
echo "* Warning vesa_drv.so missing. Assuming Xorg ABI is 64-bit..."
if test -z "$bitsize"; then
if test ! -d $vboxvideo64_dest_base; then
if test -f "$vboxadditions64_path/$vboxvideo_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
# Adjust xorg.conf with video driver sections
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
# Move the pointer integration module to kernel/drv & remove the unused module name from pkg and file from disk
# Since S11 the way to import a manifest is via restarting manifest-import which is asynchronous and can
# take a while to complete, using disable/enable -s doesn't work either. So we restart it, and poll in
# 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds.
is_import=`/usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1`
is_import=`/usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1`
echo "## See /var/svc/log/system-manifest-import:default.log for details."
if test -x "$BOOTADMBIN"; then
echo "## $BOOTADMBIN not found/executable. Skipped explicit boot-archive update."
if test ! -z "$xorgbin"; then
exit $retval