preremove.sh revision a169901884ca9d134cbfad013f290fa234c37aed
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#!/bin/sh
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# innotek VirtualBox
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# VirtualBox preremove script for Solaris.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# Copyright (C) 2007-2008 innotek GmbH
be41e59f051a3abb5cd05e7fe270ab2fea791f5avboxsync#
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncecho "Sun xVM VirtualBox - preremove script"
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncecho "This script will unload the VirtualBox kernel module..."
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# vboxdrv.sh would've been installed, we just need to call it.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/opt/VirtualBox/vboxdrv.sh stop
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# remove /dev/vboxdrv
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynccurrentzone=`zonename`
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncif test "$currentzone" = "global"; then
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync rm -f /dev/vboxdrv
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncfi
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncecho "Done."
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync