VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/win/load.sh@ 72549

Last change on this file since 72549 was 69500, checked in by vboxsync, 7 years ago

*: scm --update-copyright-year

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1#!/bin/bash
2## @file
3# For development, loads the support driver.
4#
5
6#
7# Copyright (C) 2010-2017 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26
27if test -n "$Path" -a -z "$PATH"; then
28 export PATH="$Path"
29fi
30
31MY_DIR=`cd "${0}/.." && cmd /c cd | kmk_sed -e 's,\\\\,/,g' `
32if [ ! -d "${MY_DIR}" ]; then
33 echo "Cannot find ${MY_DIR} or it's not a directory..."
34 exit 1;
35fi
36echo MY_DIR=$MY_DIR
37
38set -e
39cd "$MY_DIR"
40set +e
41
42
43#
44# Query the status of the drivers.
45#
46for drv in VBoxNetAdp VBoxNetAdp6 VBoxNetFlt VBoxNetLwf VBoxUSBMon VBoxUSB VBoxDrv;
47do
48 if sc query $drv > /dev/null; then
49 STATE=`sc query $drv \
50 | kmk_sed -e '/^ *STATE /!d' -e 's/^[^:]*: [0-9 ]*//' \
51 -e 's/ */ /g' \
52 -e 's/^ *//g' \
53 -e 's/ *$//g' \
54 `
55 echo "load.sh: $drv - $STATE"
56 else
57 echo "load.sh: $drv - not configured, probably."
58 fi
59done
60
61set -e
62set -x
63
64#
65# Invoke the uninstallers.
66#
67for uninst in NetAdpUninstall.exe NetAdp6Uninstall.exe USBUninstall.exe NetFltUninstall.exe NetLwfUninstall.exe SUPUninstall.exe;
68do
69 if test -f ${MY_DIR}/$uninst; then
70 ${MY_DIR}/$uninst
71 fi
72done
73
74#
75# Invoke the installer.
76#
77if test "$1" != "-u" -a "$1" != "--uninstall"; then
78 for inst in SUPInstall.exe;
79 do
80 if test -f ${MY_DIR}/$inst; then
81 ${MY_DIR}/$inst
82 fi
83 done
84fi
85
86echo "load.sh: Successfully installed SUPDrv (aka VBoxDrv)"
87exit 0
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