Репозиторий Sisyphus
Последнее обновление: 25 мая 2019 | Пакетов: 17693 | Посещений: 13593001
en ru br
Репозитории ALT
S:20170610-alt2.267053.1
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: kernel-modules-vhba-std-def

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

#!/bin/sh
#
# cdemu-daemon: CDEmu userspace daemon
#
# chkconfig: 345 92 02
# description: This is CDEmu userspace daemon that controls CDEmu block devices \
# and services device requests that are passed from kernel space

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

LOCKFILE=/var/lock/subsys/vhba
MODULENAME=vhba
RETVAL=0

start()
{
action "Loading kernel module ($MODULENAME):" modprobe $MODULENAME
RETVAL=$?
[ $RETVAL = 0 ] && touch "$LOCKFILE" ||:
return $RETVAL
}

stop()
{
local RETVAL
action "Unloading kernel module ($MODULENAME):" modprobe -r $MODULENAME; RETVAL=$?
[ $RETVAL = 0 ] && rm -f "$LOCKFILE" ||:
return $RETVAL
}

restart()
{
stop
start
}

status()
{
if /sbin/lsmod | grep -qs "^$MODULENAME[[:space:]]"; then
echo "$MODULENAME module is loaded"
return 0
elif [ -f "$LOCKFILE" ]; then
echo "$MODULENAME module is not loaded, but subsystem is locked"
return 2
else
echo "$MODULENAME service is stopped"
return 3
fi
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL

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