preremove.sh revision d0d8559364df06561788980a7a491598eae64fa2
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync#!/bin/sh
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# innotek VirtualBox
5b281ba489ca18f0380d7efc7a5108b606cce449vboxsync# VirtualBox pre-remove script for Solaris Guest Additions.
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync#
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# Copyright (C) 2008 innotek GmbH
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync#
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# available from http://www.virtualbox.org. This file is free software;
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# you can redistribute it and/or modify it under the terms of the GNU
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# General Public License (GPL) as published by the Free Software
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync#
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsyncecho "Sun xVM VirtualBox Guest Additions - preremove script"
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsyncecho "This script will unload the VirtualBox Guest kernel module..."
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# stop and unregister VBoxService daemon
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync/usr/sbin/svcadm disable -s svc:/system/virtualbox/vboxservice:default
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync/usr/sbin/svccfg delete svc:/system/virtualbox/vboxservice:default
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# vboxguest.sh would've been installed, we just need to call it.
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync/opt/VirtualBoxAdditions/vboxguest.sh stop
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync# Try and restore xorg.conf!
9c11b89c71ca727d975c39f2719063501ddcd03dvboxsyncecho "Restoring Xorg..."
9c11b89c71ca727d975c39f2719063501ddcd03dvboxsync/opt/VirtualBoxAdditions/x11restore.pl
9c11b89c71ca727d975c39f2719063501ddcd03dvboxsync
9c11b89c71ca727d975c39f2719063501ddcd03dvboxsyncecho "Done."
6b2e1c703bfafe40110d3769b132c1462b0fc8bbvboxsync
9c11b89c71ca727d975c39f2719063501ddcd03dvboxsync