VirtualBox

Changeset 8526 in vbox for trunk/src/VBox/Installer/solaris


Ignore:
Timestamp:
May 2, 2008 6:58:04 AM (17 years ago)
Author:
vboxsync
Message:

Solaris installer: Cleanups, better output messages.

Location:
trunk/src/VBox/Installer/solaris
Files:
2 edited

Legend:

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

    r8525 r8526  
    1818#
    1919
    20 echo "Sun xVM VirtualBox - postinstall script"
    21 sync
    22 
    2320currentzone=`zonename`
    2421if test "$currentzone" = "global"; then
    25     echo "This script will setup and load the VirtualBox kernel module..."
    26     # vboxdrv.sh would've been installed, we just need to call it.
     22    echo "Configuring VirtualBox kernel module..."
    2723    /opt/VirtualBox/vboxdrv.sh restart silentunload
    2824fi
     
    3026# create links
    3127echo "Creating links..."
    32 #/usr/sbin/installf -c none $PKGINST /dev/vboxdrv=../devices/pseudo/vboxdrv@0:vboxdrv s
    3328if test -f /opt/VirtualBox/VirtualBox; then
    3429    /usr/sbin/installf -c none $PKGINST /usr/bin/VirtualBox=/opt/VirtualBox/VBox.sh s
  • trunk/src/VBox/Installer/solaris/vboxdrv.sh

    r8172 r8526  
    1818#
    1919
    20 VBOXDRVFILE=""
    2120SILENTUNLOAD=""
     21MODNAME="vboxdrv"
     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/vboxdrv
    4243    if test -f "$modulepath"; then
    43         VBOXDRVFILE="$modulepath"
    44     else
    45         VBOXDRVFILE=""
    46     fi
    47 }
    48 
    49 check_if_installed()
    50 {
    51     if test "$VBOXDRVFILE" -a -f "$VBOXDRVFILE"; then
    5244        return 0
    5345    fi
    54     abort "VirtualBox kernel module (vboxdrv) not installed."
     46    abort "VirtualBox kernel module NOT installed."
    5547}
    5648
     
    5850{
    5951    if test -f "/etc/name_to_major"; then
    60         loadentry=`cat /etc/name_to_major | grep vboxdrv`
     52        loadentry=`cat /etc/name_to_major | grep $MODNAME`
    6153    else
    62         loadentry=`/usr/sbin/modinfo | grep vboxdrv`
     54        loadentry=`/usr/sbin/modinfo | grep $MODNAME`
    6355    fi
    6456    if test -z "$loadentry"; then
     
    7870{
    7971    if module_loaded; then
    80         info "vboxdrv already loaded..."
     72        info "VirtualBox kernel module already loaded."
    8173    else
    82         /usr/sbin/add_drv -m'* 0666 root sys' vboxdrv
     74        /usr/sbin/add_drv -m'* 0666 root sys' $MODNAME
    8375        if test ! module_loaded; then
    84             abort "Failed to load vboxdrv."
    85         elif test -c "/devices/pseudo/vboxdrv@0:vboxdrv"; then
    86             info "Loaded vboxdrv."
     76            abort "## Failed to load VirtualBox kernel module."
     77        elif test -c "/devices/pseudo/$MODNAME@0:$MODNAME"; then
     78            info "VirtualBox kernel module successfully loaded."
    8779        else
    88             stop
    8980            abort "Aborting due to attach failure."
    9081        fi
     
    9586{
    9687    if module_loaded; then
    97         /usr/sbin/rem_drv vboxdrv
    98         info "Unloaded vboxdrv."
     88        /usr/sbin/rem_drv $MODNAME || abort "## Failed to unload VirtualBox kernel module."
     89        info "VirtualBox kernel module unloaded."
    9990    elif test -z "$SILENTUNLOAD"; then
    100         info "vboxdrv not loaded."
     91        info "VirtualBox kernel module not loaded."
    10192    fi
    10293}
     
    113104{
    114105    if module_loaded; then
    115         info "vboxdrv running."
     106        info "Running."
    116107    else
    117         info "vboxdrv stopped."
     108        info "Stopped."
    118109    fi
    119110}
    120111
    121112check_root
    122 get_module_path
    123113check_if_installed
    124114
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