Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37400911
en ru br
Репозитории ALT
S:7.0.10-alt2
5.1: 4.0.12-alt0.M51.1
4.1: 2.1.4-alt0.M41.5
4.0:
+backports:1.6.6-alt0.M40.2
www.altlinux.org/Changes

Группа :: Эмуляторы
Пакет: virtualbox

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# Linux Additions Guest Additions service daemon init script.
#
# Copyright (C) 2006-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#

# chkconfig: 35 35 65
# description: VirtualBox Additions service
#
### BEGIN INIT INFO
# Provides: vboxadd-service
# Required-Start: vboxadd
# Required-Stop: vboxadd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: VirtualBox Additions Service
### END INIT INFO

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

LOCKFILE="/var/lock/subsys/vboxadd-service"
PIDFILE="/var/run/vboxadd-service"
RETVAL=0

# Source vboxadd configuration.
VBOXADD_SERVICE_ARGS=""
SourceIfNotEmpty /etc/sysconfig/vboxadd-service

binary=VBoxService

vboxaddrunning() {
lsmod | grep -q "vboxguest[^_-]"
}

start() {
if vboxaddrunning; then
start_daemon --displayname "VirtualBox Guest Addition" \
--make-pidfile --pidfile "$PIDFILE" --lockfile "$LOCKFILE" -- $binary -f $VBOXADD_SERVICE_ARGS
RETVAL=$?
else
echo "VirtualBox Additions module not loaded!"
RETVAL=2
fi
return $RETVAL
}

stop() {
stop_daemon --displayname "VirtualBox Guest Addition" --pidfile "$PIDFILE" --lockfile "$LOCKFILE" -- $binary
RETVAL=$?
return $RETVAL
}

restart() {
stop && start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status --displayname "VirtualBox Guest Addition service" --pidfile "$PIDFILE" -- $binary
;;
setup)
;;
cleanup)
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac

exit $RETVAL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin