Back
Type Name Operations
mptctl_RHEL
mptctl_SLES
register-storage-cli.sh
register-storage.sh
storage.ini
unregister-storage-cli.sh
unregister-storage.sh

File Transfer

Upload files to current directory

File Editor: mptctl_RHEL

#! /bin/sh # # Dell Inc. PROPRIETARY INFORMATION # # This software is supplied under the terms of a license agreement or # nondisclosure agreement with Dell Inc. and may not # be copied or disclosed except in accordance with the terms of that # agreement. # # Copyright (c) 2000-2006 Dell Inc. All Rights Reserved. # # Version: 2.0 # The following is for Redhat # #chkconfig: 2345 00 20 #description: Starts /Stops The LSI Logic MPTCTL driver module #processname: ## Initialize return value ## RETVAL=0 ## ## Get the proper function library. ## Set aliases for functions and some return codes ## if [ -f /lib/lsb/init-functions ]; then . /lib/lsb/init-functions alias LOG_SUCCESS=log_success_msg alias LOG_FAILURE=log_failure_msg elif [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions alias LOG_SUCCESS=success alias LOG_FAILURE=log_failure_msg elif [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions alias LOG_SUCCESS=success alias LOG_FAILURE=log_failure_msg else exit 0 fi start() { ## if mptbase is loaded, we should always install mptctl if lsmod | grep -q mptbase then echo $"Starting mptctl:" modprobe mptctl 1> /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo $"Waiting for mptctl driver registration to complete:" sleep 6 # if the special character device for # IOCTLs doesnt exist create if [ ! -c /dev/mptctl ]; then mknod /dev/mptctl c 10 220 1> /dev/null RETVAL=$? fi fi # check for complete success if [ $RETVAL -eq 0 ]; then # log the success if [ -f /lib/lsb/init-functions ]; then LOG_SUCCESS "" echo else echo -en \\033[45G echo "OK" fi else # log the error if [ -f /lib/lsb/init-functions ]; then LOG_FAILURE "" echo else echo -en \\033[45G echo "FAILED" fi fi return $RETVAL fi } stop() { return 0 } #see how we were called. case "$1" in start) start ;; stop) stop ;; *) echo $"Usage $0 {start|stop}" exit 1 esac exit $?