VirtualBox

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


Ignore:
Timestamp:
Nov 28, 2019 10:21:30 AM (5 years ago)
Author:
vboxsync
Message:

Installer/linux: add more dependency hints for vboxweb systemd service creation and use them when writing out the service. Also improve detection of python2 for the XPCOM bindings install.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/routines.sh

    r76553 r82263  
    145145    description=`sed -n 's/# *Short-Description: *\(.*\)/\1/p' "${script}"`
    146146    required=`sed -n 's/# *Required-Start: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'`
     147    required_target=`sed -n 's/# *X-Required-Target-Start: *\(.*\)/\1/p' "${script}"`
    147148    startbefore=`sed -n 's/# *X-Start-Before: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'`
    148149    runlevels=`sed -n 's/# *Default-Start: *\(.*\)/\1/p' "${script}"`
     
    151152    targets=`for i in ${runlevels}; do printf "runlevel${i}.target "; done`
    152153    before=`for i in ${startbefore}; do printf "${i}.service "; done`
    153     after=`for i in ${required}; do printf "${i}.service "; done`
     154    after=`for i in ${required_target}; do printf "${i}.target "; done` `for i in ${required}; do printf "${i}.service "; done`
    154155    cat > "${unit_path}/${name}.service" << EOF
    155156[Unit]
     
    392393    VBOX_INSTALL_PATH="${1}"
    393394
    394     PYTHON=python
    395     if [ "`python -c 'import sys
    396 if sys.version_info >= (2, 6):
    397     print \"test\"' 2> /dev/null`" != "test" ]; then
    398         echo  1>&2 "Python 2.6 or later not available, skipping bindings installation."
     395    # Check for python2 only, because the generic package does not provide
     396    # any XPCOM bindings support for python3 since there is no standard ABI.
     397    for p in python python2 python2.6 python 2.7; do
     398        if [ "`$p -c 'import sys
     399if sys.version_info >= (2, 6) and sys.version_info < (3, 0):
     400    print \"test\"' 2> /dev/null`" = "test" ]; then
     401            PYTHON=$p
     402        fi
     403    done
     404    if [ -z "$PYTHON" ]; then
     405        echo  1>&2 "Python 2 (2.6 or 2.7) not available, skipping bindings installation."
    399406        return 1
    400407    fi
  • trunk/src/VBox/Installer/linux/vboxweb-service.sh

    r76553 r82263  
    2727# Default-Stop:   0 1 6
    2828# Description:    VirtualBox web service API
     29# X-Required-Target-Start: network-online
    2930### END INIT INFO
    3031
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