VirtualBox

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


Ignore:
Timestamp:
Jul 8, 2015 12:29:34 PM (10 years ago)
Author:
vboxsync
Message:

Installers/linux: make systemd without sysvinit work.

File:
1 edited

Legend:

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

    r56851 r56859  
    341341    ## Service name.
    342342    name="${1}"
     343    test -n "${name}" || \
     344        { log "${self}: missing argument" && return 1; }
     345    test -x "`which systemctl 2>/dev/null`" && \
     346        { systemctl enable "${name}"; return; }
    343347    if test -x "/etc/rc.d/init.d/${name}"
    344348    then
     
    352356    fi
    353357    get_chkconfig_info "${init_d_path}/init.d/${name}" || return 1
    354     if test -x "`which systemctl 2>/dev/null`"
    355     then
    356         systemctl enable "${name}"
    357358    # Redhat based sysvinit systems
    358     elif test -x "`which chkconfig 2>/dev/null`"
     359    if test -x "`which chkconfig 2>/dev/null`"
    359360    then
    360361        chkconfig --add "${name}" || {
     
    399400    ## Service name.
    400401    name="${1}"
    401     test ! -z "${name}" || \
     402    test -n "${name}" || \
    402403        { log "${self}: missing argument" && return 1; }
    403404    if test -x "`which systemctl 2>/dev/null`"
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