VirtualBox

Changeset 22033 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Aug 6, 2009 12:26:12 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/Installer: vboxconfig.sh bits.

File:
1 edited

Legend:

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

    r22030 r22033  
    3333BIN_IFCONFIG=/sbin/ifconfig
    3434
     35DIR_VBOXBASE=/opt/VirtualBox
     36
    3537# "vboxdrv" is also used in sed lines here (change those as well if it ever changes)
    3638MOD_VBOXDRV=vboxdrv
     
    397399}
    398400
     401# install_python_bindings(pythonbin)
     402# remarks: changes pwd
     403# failure: non fatal
     404install_python_bindings()
     405{
     406    PYTHONBIN=$1
     407    if test -x "$PYTHONBIN"; then
     408        VBOX_INSTALL_PATH="$DIR_VBOXBASE"
     409        export VBOX_INSTALL_PATH
     410        cd $DIR_VBOXBASE/sdk/installer
     411        $PYTHONBIN ./vboxapisetup.py install > /dev/null
     412        return 0
     413    fi
     414    return 1
     415}
     416
    399417
    400418# post_install()
     
    402420post_install()
    403421{
    404     # @todo install_drivers, update boot-archive start services, patch_files, update boot archive
    405422    infoprint "Loading VirtualBox kernel modules..."
    406423    install_drivers
    407424
    408     infoprint "Updating the boot archive..."
    409     $BIN_BOOTADM update-archive > /dev/null
    410 
    411425    if test "$?" -eq 0; then
    412 
    413426        if test -f /platform/i86pc/kernel/drv/vboxnet.conf; then       
    414427            # nwam/dhcpagent fix
     
    429442            fi
    430443        fi
     444
     445        # Install python bindings
     446        if test -f "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py" || test -h "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py"; then
     447            PYTHONBIN=`which python 2> /dev/null`
     448            if test -f "$PYTHONBIN" || test -h "$PYTHONBIN"; then
     449                infoprint "Installing Python bindings..."
     450
     451                INSTALLEDIT=1
     452                PYTHONBIN=`which python2.4 2>/dev/null`
     453                install_python_bindings "$PYTHONBIN"
     454                if test "$?" -eq 0; then
     455                    INSTALLEDIT=0
     456                fi
     457                PYTHONBIN=`which python2.5 2>/dev/null`
     458                install_python_bindings "$PYTHONBIN"
     459                if test "$?" -eq 0; then
     460                    INSTALLEDIT=0
     461                fi
     462                PYTHONBIN=`which python2.6 2>/dev/null`
     463                install_python_bindings "$PYTHONBIN"
     464                if test "$?" -eq 0; then
     465                    INSTALLEDIT=0
     466                fi
     467
     468                # remove files installed by Python build
     469                rm -rf $DIR_VBOXBASE/sdk/installer/build
     470
     471                if test "$INSTALLEDIT" -ne 0; then
     472                    warnprint "No suitable Python version found. Required Python 2.4, 2.5 or 2.6."
     473                fi
     474            else
     475                warnprint "Python not found, skipped installed Python bindings."
     476            fi
     477        fi
     478
     479        # Update boot archive
     480        infoprint "Updating the boot archive..."
     481        $BIN_BOOTADM update-archive > /dev/null
    431482
    432483        return 0
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