VirtualBox

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


Ignore:
Timestamp:
Sep 20, 2010 1:10:08 PM (14 years ago)
Author:
vboxsync
Message:

Solaris/Installer: Remote installation fix. Make package non-relocatable and use PKG_INSTALL_ROOT.

File:
1 edited

Legend:

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

    r32583 r32640  
    2424HOST_OS_MINORVERSION=`uname -v | grep 'snv' | sed -e "s/snv_//" -e "s/[^0-9]//"`
    2525
    26 DIR_VBOXBASE=${BASEDIR}/opt/VirtualBox
    27 DIR_CONF="${BASEDIR}/platform/i86pc/kernel/drv"
    28 DIR_MOD_32="${BASEDIR}/platform/i86pc/kernel/drv"
    29 DIR_MOD_64=$DIR_MOD_32/amd64
     26DIR_VBOXBASE="$PKG_INSTALL_ROOT/opt/VirtualBox"
     27DIR_CONF="$PKG_INSTALL_ROOT/platform/i86pc/kernel/drv"
     28DIR_MOD_32="$PKG_INSTALL_ROOT/platform/i86pc/kernel/drv"
     29DIR_MOD_64="$DIR_MOD_32/amd64"
    3030
    3131# Default paths, these will be overridden by 'which' if they don't exist
     
    220220{
    221221    if test "$REMOTEINST" -eq 1 || test -z "$HOST_OS_MINORVERSION" || test -z "$HOST_OS_MAJORVERSION"; then
    222         if test -f "${BASEDIR}/etc/release"; then
    223             HOST_OS_MAJORVERSION=`cat ${BASEDIR}/etc/release | grep "Solaris 10"`
     222        if test -f "$PKG_INSTALL_ROOT/etc/release"; then
     223            HOST_OS_MAJORVERSION=`cat $PKG_INSTALL_ROOT/etc/release | grep "Solaris 10"`
    224224            if test -n "$HOST_OS_MAJORVERSION"; then
    225225                HOST_OS_MAJORVERSION="5.10"
    226226            else
    227                 HOST_OS_MAJORVERSION=`cat ${BASEDIR}/etc/release | grep "snv_"`
     227                HOST_OS_MAJORVERSION=`cat $PKG_INSTALL_ROOT/etc/release | grep "snv_"`
    228228                if test -n "$HOST_OS_MAJORVERSION"; then
    229229                    HOST_OS_MAJORVERSION="5.11"
     
    231231            fi
    232232            if test "$HOST_OS_MAJORVERSION" != "5.10"; then
    233                 HOST_OS_MINORVERSION=`cat ${BASEDIR}/etc/release | tr ' ' '\n' | grep 'snv_' | sed -e "s/snv_//" -e "s/[^0-9]//"`
     233                HOST_OS_MINORVERSION=`cat $PKG_INSTALL_ROOT/etc/release | tr ' ' '\n' | grep 'snv_' | sed -e "s/snv_//" -e "s/[^0-9]//"`
    234234            else
    235235                HOST_OS_MINORVERSION=""
     
    285285
    286286    # Add a space at end of module name to make sure we have a perfect match to avoid
    287     # any substring matches: e.g "vboxusb" & "vbo $BASEDIR_OPT xusbmon"
    288     loadentry=`cat ${BASEDIR}/etc/name_to_major | grep "$1 "`
     287    # any substring matches: e.g "vboxusb" & "vboxusbmon"
     288    loadentry=`cat $PKG_INSTALL_ROOT/etc/name_to_major | grep "$1 "`
    289289    if test -z "$loadentry"; then
    290290        return 1
     
    467467
    468468    # Add vboxdrv to devlink.tab
    469     if test -f "${BASEDIR}/etc/devlink.tab"; then
    470         sed -e '/name=vboxdrv/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox
    471         echo "type=ddi_pseudo;name=vboxdrv      \D" >> ${BASEDIR}/etc/devlink.vbox
    472         mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab
     469    if test -f "$PKG_INSTALL_ROOT/etc/devlink.tab"; then
     470        sed -e '/name=vboxdrv/d' $PKG_INSTALL_ROOT/etc/devlink.tab > $PKG_INSTALL_ROOT/etc/devlink.vbox
     471        echo "type=ddi_pseudo;name=vboxdrv      \D" >> $PKG_INSTALL_ROOT/etc/devlink.vbox
     472        mv -f $PKG_INSTALL_ROOT/etc/devlink.vbox $PKG_INSTALL_ROOT/etc/devlink.tab
    473473    else
    474         errorprint "Missing ${BASEDIR}/etc/devlink.tab, aborting install"
     474        errorprint "Missing $PKG_INSTALL_ROOT/etc/devlink.tab, aborting install"
    475475        return 1
    476476    fi
     
    505505
    506506            # Add vboxusbmon to devlink.tab
    507             sed -e '/name=vboxusbmon/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox
    508             echo "type=ddi_pseudo;name=vboxusbmon       \D" >> ${BASEDIR}/etc/devlink.vbox
    509             mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab
     507            sed -e '/name=vboxusbmon/d' $PKG_INSTALL_ROOT/etc/devlink.tab > $PKG_INSTALL_ROOT/etc/devlink.vbox
     508            echo "type=ddi_pseudo;name=vboxusbmon       \D" >> $PKG_INSTALL_ROOT/etc/devlink.vbox
     509            mv -f $PKG_INSTALL_ROOT/etc/devlink.vbox $PKG_INSTALL_ROOT/etc/devlink.tab
    510510
    511511            # Create the device link for non-remote installs
     
    545545
    546546    # Remove vboxdrv from devlink.tab
    547     if test -f ${BASEDIR}/etc/devlink.tab; then
    548         devlinkfound=`cat ${BASEDIR}/etc/devlink.tab | grep vboxdrv`
     547    if test -f $PKG_INSTALL_ROOT/etc/devlink.tab; then
     548        devlinkfound=`cat $PKG_INSTALL_ROOT/etc/devlink.tab | grep vboxdrv`
    549549        if test -n "$devlinkfound"; then
    550             sed -e '/name=vboxdrv/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox
    551             mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab
     550            sed -e '/name=vboxdrv/d' $PKG_INSTALL_ROOT/etc/devlink.tab > $PKG_INSTALL_ROOT/etc/devlink.vbox
     551            mv -f $PKG_INSTALL_ROOT/etc/devlink.vbox $PKG_INSTALL_ROOT/etc/devlink.tab
    552552        fi
    553553
    554554        # Remove vboxusbmon from devlink.tab
    555         devlinkfound=`cat ${BASEDIR}/etc/devlink.tab | grep vboxusbmon`
     555        devlinkfound=`cat $PKG_INSTALL_ROOT/etc/devlink.tab | grep vboxusbmon`
    556556        if test -n "$devlinkfound"; then
    557             sed -e '/name=vboxusbmon/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox
    558             mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab
     557            sed -e '/name=vboxusbmon/d' $PKG_INSTALL_ROOT/etc/devlink.tab > $PKG_INSTALL_ROOT/etc/devlink.vbox
     558            mv -f $PKG_INSTALL_ROOT/etc/devlink.vbox $PKG_INSTALL_ROOT/etc/devlink.tab
    559559        fi
    560560    fi
     
    579579
    580580    # remove devlinks
    581     if test -h "${BASEDIR}/dev/vboxdrv" || test -f "${BASEDIR}/dev/vboxdrv"; then
    582         rm -f ${BASEDIR}/dev/vboxdrv
    583     fi
    584     if test -h "${BASEDIR}/dev/vboxusbmon" || test -f "${BASEDIR}/dev/vboxusbmon"; then
    585         rm -f ${BASEDIR}/dev/vboxusbmon
     581    if test -h "$PKG_INSTALL_ROOT/dev/vboxdrv" || test -f "$PKG_INSTALL_ROOT/dev/vboxdrv"; then
     582        rm -f $PKG_INSTALL_ROOT/dev/vboxdrv
     583    fi
     584    if test -h "$PKG_INSTALL_ROOT/dev/vboxusbmon" || test -f "$PKG_INSTALL_ROOT/dev/vboxusbmon"; then
     585        rm -f $PKG_INSTALL_ROOT/dev/vboxusbmon
    586586    fi
    587587
    588588    # unpatch nwam/dhcpagent fix
    589     nwamfile=${BASEDIR}/etc/nwam/llp
     589    nwamfile=$PKG_INSTALL_ROOT/etc/nwam/llp
    590590    nwambackupfile=$nwamfile.vbox
    591591    if test -f "$nwamfile"; then
     
    595595
    596596    # remove netmask configuration
    597     nmaskfile=${BASEDIR}/etc/netmasks
     597    nmaskfile=$PKG_INSTALL_ROOT/etc/netmasks
    598598    nmaskbackupfile=$nmaskfile.vbox
    599599    if test -f "$nmaskfile"; then
     
    744744        if test -f "$DIR_CONF/vboxnet.conf"; then
    745745            # nwam/dhcpagent fix
    746             nwamfile=${BASEDIR}/etc/nwam/llp
     746            nwamfile=$PKG_INSTALL_ROOT/etc/nwam/llp
    747747            nwambackupfile=$nwamfile.vbox
    748748            if test -f "$nwamfile"; then
     
    767767
    768768                    # add the netmask to stay persistent across host reboots
    769                     nmaskfile=${BASEDIR}/etc/netmasks
     769                    nmaskfile=$PKG_INSTALL_ROOT/etc/netmasks
    770770                    nmaskbackupfile=$nmaskfile.vbox
    771771                    if test -f $nmaskfile; then
     
    789789        fi
    790790
    791         if test -f ${BASEDIR}/var/svc/manifest/application/virtualbox/virtualbox-webservice.xml || test -f ${BASEDIR}/var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then
     791        if test -f $PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-webservice.xml || test -f $PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then
    792792            infoprint "Configuring services..."
    793793            if test "$REMOTEINST" -eq 1; then
     
    853853            $BIN_BOOTADM update-archive > /dev/null
    854854        else
    855             $BIN_BOOTADM update-archive -R ${BASEDIR} > /dev/null
     855            $BIN_BOOTADM update-archive -R $PKG_INSTALL_ROOT > /dev/null
    856856        fi
    857857
     
    888888get_sysinfo
    889889
    890 if test "x${BASEDIR:=/}" != "x/"; then
    891     BASEDIR_OPT="-b ${BASEDIR}"
     890if test "x${PKG_INSTALL_ROOT:=/}" != "x/"; then
     891    BASEDIR_OPT="-b $PKG_INSTALL_ROOT"
    892892    REMOTEINST=1
    893893fi
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