VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/solaris/mod.sh@ 8009

最後變更 在這個檔案從8009是 6710,由 vboxsync 提交於 17 年 前

Solaris vboxdrv SYSSUFF correction.

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:executable 設為 *
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 1.4 KB
 
1#!/bin/sh
2set -x
3#
4# Figure out the environment and locations.
5#
6
7# Sudo isn't native solaris, but it's very convenient...
8if test -z "$SUDO" && test "`whoami`" != "root"; then
9 SUDO=sudo
10fi
11
12script_dir=`dirname "$0"`
13# src/VBox/HostDrivers/solaris/ residence:
14script_dir=`cd "$script_dir/../../../../.." ; /bin/pwd`
15## root residence:
16#script_dir=`cd "$script_dir" ; /bin/pwd`
17
18set -e
19if test -z "$BUILD_TARGET"; then
20 export BUILD_TARGET=solaris
21fi
22if test -z "$BUILD_TARGET_ARCH"; then
23 export BUILD_TARGET_ARCH=x86
24fi
25if test -z "$BUILD_TYPE"; then
26 export BUILD_TYPE=debug
27fi
28
29DIR=$script_dir/out/$BUILD_TARGET.$BUILD_TARGET_ARCH/$BUILD_TYPE/bin/
30
31VBOXDRV_CONF_DIR=/platform/i86pc/kernel/drv
32if test "$BUILD_TARGET_ARCH" = "amd64"; then
33 VBOXDRV_DIR=$VBOXDRV_CONF_DIR/amd64
34else
35 VBOXDRV_DIR=$VBOXDRV_CONF_DIR
36fi
37
38#
39# Do the job.
40#
41$SUDO cp $DIR/vboxdrv $VBOXDRV_DIR/vboxdrv
42$SUDO cp $script_dir/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf $VBOXDRV_CONF_DIR/vboxdrv.conf
43old_id=`/usr/sbin/modinfo | grep vbox | cut -f 1 -d ' ' `
44if test -n "$old_id"; then
45 echo "* unloading $old_id..."
46 sync
47 sync
48 $SUDO /usr/sbin/modunload -i $old_id
49else
50 echo "* If it fails below, run: $SUDO add_drv -m'* 0666 root sys' vboxdrv"
51fi
52echo "* loading vboxdrv..."
53sync
54sync
55$SUDO /usr/sbin/modload $VBOXDRV_DIR/vboxdrv
56/usr/sbin/modinfo | grep vboxdrv
57echo "* dmesg:"
58dmesg | tail -20
59$SUDO chmod a+rw /devices/pseudo/vboxdrv*
60
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette