VirtualBox

Changeset 8939 in vbox


Ignore:
Timestamp:
May 20, 2008 8:00:41 AM (17 years ago)
Author:
vboxsync
Message:

Solaris guest installer: cleanups and some changes.

Location:
trunk/src/VBox/Additions/solaris/Installer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/Installer/postinstall.sh

    r8697 r8939  
    1818#
    1919
    20 echo "Sun xVM VirtualBox Guest Additions - postinstall script"
    21 echo "This script will setup and load the VirtualBox Guest kernel module..."
     20echo "Configuring VirtualBox guest kernel module..."
    2221
    2322sync
     
    3332
    3433# create links
     34echo "Creating links..."
    3535/usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s
    3636/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient=$vboxadditions_path/VBoxClient s
  • trunk/src/VBox/Additions/solaris/Installer/vboxguest.sh

    r8177 r8939  
    1818#
    1919
    20 VBOXGUESTFILE=""
    2120SILENTUNLOAD=""
     21MODNAME="vboxguest"
     22MODDIR32="/platform/i86pc/kernel/drv"
     23MODDIR64=$MODDIR32/amd64
    2224
    2325abort()
     
    3234}
    3335
    34 get_module_path()
     36check_if_installed()
    3537{
    3638    cputype=`isainfo -k`
    37     moduledir="/platform/i86pc/kernel/drv";
     39    modulepath="$MODDIR32/$MODNAME"   
    3840    if test "$cputype" = "amd64"; then
    39         moduledir=$moduledir/amd64
     41        modulepath="$MODDIR64/$MODNAME"
    4042    fi
    41     modulepath=$moduledir/vboxguest
    4243    if test -f "$modulepath"; then
    43         VBOXGUESTFILE="$modulepath"
    44     else
    45         VBOXGUESTFILE=""
    46     fi
    47 }
    48 
    49 check_if_installed()
    50 {
    51     if test "$VBOXGUESTFILE" -a -f "$VBOXGUESTFILE"; then
    5244        return 0
    5345    fi
    54     abort "VirtualBox kernel module (vboxguest) not installed."
     46    abort "VirtualBox kernel module ($MODNAME) NOT installed."
    5547}
    5648
    5749module_loaded()
    5850{
    59     loadentry=`cat /etc/name_to_major | grep vboxguest`
     51    if test -f "/etc/name_to_major"; then
     52        loadentry=`cat /etc/name_to_major | grep $MODNAME`
     53    else
     54        loadentry=`/usr/sbin/modinfo | grep $MODNAME`
     55    fi
    6056    if test -z "$loadentry"; then
    6157        return 1
     
    7470{
    7571    if module_loaded; then
    76         info "vboxguest already loaded..."
     72        info "VirtualBox guest kernel module already loaded."
    7773    else
    78         /usr/sbin/add_drv -i'pci80ee,cafe' -m'* 0666 root sys' vboxguest
     74        /usr/sbin/add_drv -i'pci80ee,cafe' -m'* 0666 root sys' $MODNAME
    7975        if test ! module_loaded; then
    80             abort "Failed to load vboxguest."
    81         elif test -c "/devices/pci@0,0/pci80ee,cafe@4:vboxguest"; then
    82             info "Loaded vboxguest."
     76            abort "## Failed to load VirtualBox guest kernel module."
     77        elif test -c "/devices/pci@0,0/pci80ee,cafe@4:$MODNAME"; then
     78            info "VirtualBox guest kernel module loaded."
    8379        else
    8480            stop
     
    9187{
    9288    if module_loaded; then
    93         /usr/sbin/rem_drv vboxguest
    94         info "Unloaded vboxguest."
     89        /usr/sbin/rem_drv $MODNAME || abort "## Failed to unload VirtualBox guest kernel module."
     90        info "VirtualBox guest kernel module unloaded."
    9591    elif test -z "$SILENTUNLOAD"; then
    96         info "vboxguest not loaded."
     92        info "VirtualBox guest kernel module not loaded."
    9793    fi
    9894}
     
    109105{
    110106    if module_loaded; then
    111         info "vboxguest running."
     107        info "Running."
    112108    else
    113         info "vboxguest stopped."
     109        info "Stopped."
    114110    fi
    115111}
    116112
    117113check_root
    118 get_module_path
    119114check_if_installed
    120115
  • trunk/src/VBox/Additions/solaris/Installer/vboxservice.xml

    r8177 r8939  
    55#
    66     Copyright (C) 2008 Sun Microsystems, Inc.
    7    
     7
    88     This file is part of VirtualBox Open Source Edition (OSE), as
    99     available from http://www.virtualbox.org. This file is free software;
     
    1313     VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    1414     hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    15    
     15
    1616     Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
    1717     Clara, CA 95054 USA or visit http://www.sun.com if you need
     
    3636        grouping='require_all'
    3737        restart_on='none'
    38         type='service'> 
     38        type='service'>
    3939        <service_fmri value='svc:/milestone/devices:default' />
    4040    </dependency>
     
    4747        type='service'>
    4848        <service_fmri value='svc:/system/filesystem/local:default' />
    49     </dependency> 
     49    </dependency>
    5050
    5151    <exec_method
Note: See TracChangeset for help on using the changeset viewer.

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