diff options
Diffstat (limited to 'sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis')
-rw-r--r-- | sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis b/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis deleted file mode 100644 index f993fd392930..000000000000 --- a/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis +++ /dev/null @@ -1,69 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# This file is tasked with testing for the existence of the ibmvscsis driver -# and configuring the ibmvscsi server properly as indicated by the config file -# located at /etc/ibmvscsis.conf -# - -DRIVER=ibmvscsis -SYSFS=/sys/bus/vio/drivers/ibmvscsis -CONFIG=/etc/ibmvscsis.conf - -depend() { - need logger - provide ibmvscsis -} - -checkconfig() { - if [ ! -e ${CONFIG} ] ; then - eerror " ${CONFIG} does not exist." - return 1 - fi -} - -checkmodule_load() { - # The existence of $SYSFS indicates that the module has been loaded or that - # the driver is at least built into the kernel. - if [ ! -e ${SYSFS} ] ; then - ewarn " Module ${DRIVER} is not loaded, attempting to load it" - /sbin/modprobe ${DRIVER} &> /dev/null && return 0 - eerror " Failed to load module ${DRIVER}" - return 1 - fi -} - -checkmodule() { - # The existence of $SYSFS indicates that the module has been loaded or that - # the driver is at least built into the kernel. - if [ ! -e ${SYSFS} ] ; then - eerror " Module ${DRIVER} is not loaded" - return 1 - fi -} - -start() { - ebegin "Starting vscsiadmin" - checkconfig || return 1 - checkmodule_load || return 1 - /usr/sbin/vscsiadmin -start &> /dev/null - eend $? "Failed to start vscsiadmin" -} - -stop() { - ebegin "Stopping vscsiadmin" - checkmodule || return 1 - /usr/sbin/vscsiadmin -stop &> /dev/null - eend $? "Failed to stop vscsiadmin" -} - -status() { - checkmodule || return 1 - /usr/sbin/vscsiadmin -status -} - -restart() { - stop - start -} |