VirtualBox

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


Ignore:
Timestamp:
Apr 15, 2011 4:48:33 PM (14 years ago)
Author:
vboxsync
Message:

Installer/linux: packaging and service scripts for VBoxBalloonCtrl

Location:
trunk/src/VBox/Installer/linux
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/Makefile.kmk

    r35463 r36688  
    55
    66#
    7 # Copyright (C) 2006-2010 Oracle Corporation
     7# Copyright (C) 2006-2011 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    4848                deffiles \
    4949                routines.sh \
     50                vboxballoonctrl-service.sh \
    5051                vboxdrv.sh \
    5152                vboxweb-service.sh \
     
    5455        $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \
    5556        $(addprefix $(VBOX_LNX_INST_OUT_DIR)/,\
     57                vboxballoonctrl-service.sh \
    5658                vboxdrv.sh \
    5759                vboxweb-service.sh \
     
    118120        $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
    119121        $(if $(VBOX_WITH_MAIN), \
     122                VBoxBalloonCtrl \
    120123                VBoxManage \
    121124                VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
     
    298301                $(VBOX_PATH_LNX_INST_SRC)/deffiles \
    299302                $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
     303                $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh \
    300304                $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
    301305                $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \
     
    312316        $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles             $(VBOX_LNX_INST_STAGE_DIR)/
    313317        $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT)    $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
     318        $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
    314319        $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh            $(VBOX_LNX_INST_STAGE_DIR)/
    315320        $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh    $(VBOX_LNX_INST_STAGE_DIR)/
     
    322327
    323328# files that needs editing before they can be included in the generic installer.
     329$(VBOX_LNX_INST_OUT_DIR)/vboxballoonctrl-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxballoonctrl-service.sh.in | $$(dir $$@)
     330        $(QUIET)$(SED_EXT) \
     331                -e "s|%NOLSB%|yes|g" \
     332                -e "s|%DEBIAN%||g" \
     333                -e "s|%PACKAGE%|virtualbox|g" \
     334                --output $@ \
     335                $<
     336
    324337$(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
    325338        $(QUIET)$(SED_EXT) \
  • trunk/src/VBox/Installer/linux/vboxballoonctrl-service.sh.in

    r36685 r36688  
    11#!/bin/sh
    22#
    3 # VirtualBox web service API daemon init script.
     3# VirtualBox balloon control daemon init script.
    44#
    55# Copyright (C) 2006-2011 Oracle Corporation
     
    1515
    1616# chkconfig: 35 35 65
    17 # description: VirtualBox web service API
     17# description: VirtualBox balloon control daemon
    1818#
    1919### BEGIN INIT INFO
    20 # Provides:       vboxweb-service
     20# Provides:       vboxballoonctrl-service
    2121# Required-Start: vboxdrv
    2222# Required-Stop:  vboxdrv
    2323# Default-Start:  2 3 4 5
    2424# Default-Stop:   0 1 6
    25 # Description:    VirtualBox web service API
     25# Description:    VirtualBox balloon control daemon
    2626### END INIT INFO
    2727
     
    3434
    3535if [ -n "$INSTALL_DIR" ]; then
    36     binary="$INSTALL_DIR/vboxwebsrv"
     36    binary="$INSTALL_DIR/VBoxBalloonCtrl"
    3737else
    38     binary="/usr/lib/%PACKAGE%/vboxwebsrv"
     38    binary="/usr/lib/%PACKAGE%/VBoxBalloonCtrl"
    3939fi
    4040
     
    4848if [ -f /etc/redhat-release ]; then
    4949    system=redhat
    50     PIDFILE="/var/lock/subsys/vboxweb-service"
     50    PIDFILE="/var/lock/subsys/vboxballoonctrl-service"
    5151elif [ -f /etc/SuSE-release ]; then
    5252    system=suse
    53     PIDFILE="/var/lock/subsys/vboxweb-service"
     53    PIDFILE="/var/lock/subsys/vboxballoonctrl-service"
    5454elif [ -f /etc/debian_version ]; then
    5555    system=debian
    56     PIDFILE="/var/run/vboxweb-service"
     56    PIDFILE="/var/run/vboxballoonctrl-service"
    5757elif [ -f /etc/gentoo-release ]; then
    5858    system=gentoo
    59     PIDFILE="/var/run/vboxweb-service"
     59    PIDFILE="/var/run/vboxballoonctrl-service"
    6060elif [ -f /etc/arch-release ]; then
    6161     system=arch
    62      PIDFILE="/var/run/vboxweb-service"
     62     PIDFILE="/var/run/vboxballoonctrl-service"
    6363elif [ -f /etc/slackware-version ]; then
    6464    system=slackware
    65     PIDFILE="/var/run/vboxweb-service"
     65    PIDFILE="/var/run/vboxballoonctrl-service"
    6666elif [ -f /etc/lfs-release ]; then
    6767    system=lfs
    68     PIDFILE="/var/run/vboxweb-service.pid"
     68    PIDFILE="/var/run/vboxballoonctrl-service.pid"
    6969else
    7070    system=other
    7171    if [ -d /var/run -a -w /var/run ]; then
    72         PIDFILE="/var/run/vboxweb-service"
     72        PIDFILE="/var/run/vboxballoonctrl-service"
    7373    fi
    7474fi
     
    276276check_single_user() {
    277277    if [ -n "$2" ]; then
    278         fail_msg "VBOXWEB_USER must not contain multiple users!"
     278        fail_msg "VBOXBALLOONCTRL_USER must not contain multiple users!"
    279279        exit 1
    280280    fi
     
    283283start() {
    284284    if ! test -f $PIDFILE; then
    285         [ -z "$VBOXWEB_USER" ] && exit 0
    286         begin_msg "Starting VirtualBox web service";
    287         check_single_user $VBOXWEB_USER
     285        [ -z "$VBOXBALLOONCTRL_USER" ] && exit 0
     286        begin_msg "Starting VirtualBox balloon control service";
     287        check_single_user $VBOXBALLOONCTRL_USER
    288288        vboxdrvrunning || {
    289289            fail_msg "VirtualBox kernel module not loaded!"
     
    291291        }
    292292        PARAMS="--background"
    293         [ -n "$VBOXWEB_HOST" ]           && PARAMS="$PARAMS -H $VBOXWEB_HOST"
    294         [ -n "$VBOXWEB_PORT" ]           && PARAMS="$PARAMS -p $VBOXWEB_PORT"
    295         [ -n "$VBOXWEB_TIMEOUT" ]        && PARAMS="$PARAMS -t $VBOXWEB_TIMEOUT"
    296         [ -n "$VBOXWEB_CHECK_INTERVAL" ] && PARAMS="$PARAMS -i $VBOXWEB_CHECK_INTERVAL"
    297         [ -n "$VBOXWEB_THREADS" ]        && PARAMS="$PARAMS -T $VBOXWEB_THREADS"
    298         [ -n "$VBOXWEB_KEEPALIVE" ]      && PARAMS="$PARAMS -k $VBOXWEB_KEEPALIVE"
    299         [ -n "$VBOXWEB_LOGFILE" ]        && PARAMS="$PARAMS -F $VBOXWEB_LOGFILE"
    300         [ -n "$VBOXWEB_ROTATE" ]         && PARAMS="$PARAMS -R $VBOXWEB_ROTATE"
    301         [ -n "$VBOXWEB_LOGSIZE" ]        && PARAMS="$PARAMS -S $VBOXWEB_LOGSIZE"
    302         [ -n "$VBOXWEB_LOGINTERVAL" ]    && PARAMS="$PARAMS -I $VBOXWEB_LOGINTERVAL"
     293        [ -n "$VBOXBALLOONCTRL_INTERVAL" ]      && PARAMS="$PARAMS --interval $VBOXBALLOONCTRL_INTERVAL"
     294        [ -n "$VBOXBALLOONCTRL_INCREMENT" ]     && PARAMS="$PARAMS --balloon-inc $VBOXBALLOONCTRL_INCREMENT"
     295        [ -n "$VBOXBALLOONCTRL_DECREMENT" ]     && PARAMS="$PARAMS --balloon-dec $VBOXBALLOONCTRL_DECREMENT"
     296        [ -n "$VBOXBALLOONCTRL_LOWERLIMIT" ]    && PARAMS="$PARAMS --balloon-lower-limit $VBOXBALLOONCTRL_LOWERLIMIT"
     297        [ -n "$VBOXBALLOONCTRL_ROTATE" ]        && PARAMS="$PARAMS - $VBOXBALLOONCTRL_ROTATE"
     298        [ -n "$VBOXBALLOONCTRL_LOGSIZE" ]       && PARAMS="$PARAMS -S $VBOXBALLOONCTRL_LOGSIZE"
     299        [ -n "$VBOXBALLOONCTRL_LOGINTERVAL" ]   && PARAMS="$PARAMS -I $VBOXBALLOONCTRL_LOGINTERVAL"
    303300        # prevent inheriting this setting to VBoxSVC
    304301        unset VBOX_RELEASE_LOG_DEST
    305         start_daemon $VBOXWEB_USER $binary $PARAMS > /dev/null 2>&1
     302        start_daemon $VBOXBALLOONCTRL_USER $binary $PARAMS > /dev/null 2>&1
    306303        # ugly: wait until the final process has forked
    307304        sleep .1
     
    321318stop() {
    322319    if test -f $PIDFILE; then
    323         begin_msg "Stopping VirtualBox web service";
     320        begin_msg "Stopping VirtualBox balloon control service";
    324321        killproc $binary
    325322        RETVAL=$?
     
    339336
    340337status() {
    341     echo -n "Checking for VBox Web Service"
     338    echo -n "Checking for VBox balloon control service"
    342339    if [ -f $PIDFILE ]; then
    343340        echo " ...running"
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