Remove obsolete iSCSI-SCST init scripts (merge r3564 from trunk).

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@3995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-12-15 12:43:37 +00:00
parent bcf7cfa552
commit e4724285a0
5 changed files with 0 additions and 450 deletions

View File

@@ -48,17 +48,6 @@ include/iscsi_scst_itf_ver.h: include/iscsi_scst.h
install: all
@install -vD -m 755 usr/iscsi-scstd $(DESTDIR)$(SBINDIR)/iscsi-scstd
@install -vD -m 755 usr/iscsi-scst-adm $(DESTDIR)$(SBINDIR)/iscsi-scst-adm
if [ -f /etc/debian_version ]; then \
install -vD -m 755 etc/initd/initd.debian $(DESTDIR)$(INITDIR)/iscsi-scst; \
elif [ -f /etc/redhat-release ]; then \
install -vD -m 755 etc/initd/initd.redhat $(DESTDIR)$(INITDIR)/iscsi-scst; \
elif [ -f /etc/gentoo-release ]; then \
install -vD -m 755 etc/initd/initd.gentoo $(DESTDIR)$(INITDIR)/iscsi-scst; \
elif [ -f /etc/slackware-version ]; then \
install -vD -m 755 etc/initd/initd $(DESTDIR)$(RCDIR)/iscsi-scst; \
else \
install -vD -m 755 etc/initd/initd $(DESTDIR)$(INITDIR)/iscsi-scst; \
fi
@eval `sed -n 's/#define UTS_RELEASE /KERNELRELEASE=/p' $(KDIR)/include/linux/version.h $(KDIR)/include/linux/utsrelease.h 2>/dev/null`; \
install -vD -m 644 kernel/iscsi-scst.ko \
$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra/iscsi-scst.ko

View File

@@ -1,85 +0,0 @@
#!/bin/bash
#
# Start the iSCSI-SCST Target.
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MEM_SIZE=1048576
SCST_CMD=/usr/local/sbin/scstadmin
SCST_CFG=/etc/scst.conf
# Additional modules to load/unload
ADD_MODULES="scst_vdisk scst"
configure_memsize()
{
if [ -e /proc/sys/net/core/wmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max
fi
if [ -e /proc/sys/net/core/rmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max
fi
if [ -e /proc/sys/net/core/wmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default
fi
if [ -e /proc/sys/net/core/rmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default
fi
if [ -e /proc/sys/net/ipv4/tcp_mem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem
fi
if [ -e /proc/sys/net/ipv4/tcp_rmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem
fi
if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem
fi
}
start_server()
{
# configure_memsize
modprobe -q crc32c 2>/dev/null
modprobe -q crc32c-intel 2>/dev/null
modprobe iscsi-scst || { exit $? ; }
for module in ${ADD_MODULES}; do
modprobe ${module} || { exit 1 ; }
done
/usr/local/sbin/iscsi-scstd
$SCST_CMD -config $SCST_CFG || { exit $? ; }
}
stop_server()
{
killall iscsi-scstd
rmmod -w iscsi-scst || { exit $? ; }
rmmod ${ADD_MODULES} || { exit $? ; }
}
case "$1" in
start)
start_server
;;
stop)
stop_server
;;
restart)
stop_server
start_server
;;
*)
echo "Usage: {start|stop}" >&2
exit 1
;;
esac
exit $?

View File

@@ -1,132 +0,0 @@
#!/bin/sh
#
# chkconfig: - 39 35
# description: Starts and stops the iSCSI target
# debianized start-stop script
PID_FILE=/var/run/iscsi-scstd.pid
CONFIG_FILE=/etc/iscsi-scstd.conf
DAEMON=/usr/local/sbin/iscsi-scstd
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
# Don't touch this "memsize thingy" unless you are blessed
# with knowledge about it.
MEM_SIZE=1048576
ADD_MODULES="scst_vdisk scst"
configure_memsize()
{
if [ -e /proc/sys/net/core/wmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max
fi
if [ -e /proc/sys/net/core/rmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max
fi
if [ -e /proc/sys/net/core/wmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default
fi
if [ -e /proc/sys/net/core/rmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default
fi
if [ -e /proc/sys/net/ipv4/tcp_mem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem
fi
if [ -e /proc/sys/net/ipv4/tcp_rmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem
fi
if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem
fi
}
RETVAL=0
iscsi_scstd_start()
{
echo -n "Starting iSCSI-SCST target service: "
# configure_memsize
modprobe -q crc32c 2>/dev/null
modprobe -q crc32c-intel 2>/dev/null
modprobe iscsi-scst
for m in $ADD_MODULES; do
modprobe $m
done
start-stop-daemon --start --exec $DAEMON --quiet
/usr/local/sbin/scstadmin -config /etc/scst.conf
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "succeeded."
else
echo "failed."
rmmod iscsi-scst
fi
}
iscsi_scstd_stop()
{
echo -n "Stopping iSCSI-SCST target service: "
start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "succeeded."
else
echo "failed."
fi
# ugly, but pid file is not removed by iscsi-scstd
rm -f $PID_FILE
echo -n "Removing iSCSI-SCST target modules: "
if [ -e /sys/module/iscsi_scst ]; then
rmmod -w iscsi-scst
fi
RETVAL=$?
for m in $ADD_MODULES; do
if [ -e /sys/module/$m ]; then
rmmod -w $m
fi
RETVAL=$?
done
modprobe -r crc32c 2>/dev/null
if [ $RETVAL -eq 0 ]; then
echo "succeeded."
else
echo "failed."
exit 1
fi
}
case "$1" in
start)
iscsi_scstd_start
;;
stop)
iscsi_scstd_stop
;;
restart)
iscsi_scstd_stop
sleep 1
iscsi_scstd_start
;;
status)
PID=`pidof iscsi-scstd`
if [ $PID ]; then
echo "iSCSI-SCST target is running at pid $PID"
else
echo "no iSCSI-SCST target found!"
exit 1
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|status|dump}"
exit 1
esac
exit 0

View File

@@ -1,78 +0,0 @@
#!/sbin/runscript
#
# System startup script for the SCST iSCSI functionality.
#
# Customized for gentoo linux by Scott Bowe.
#
# Note: on most Linux distributions /bin/sh is a soft link to /bin/bash, while
# on a default Ubuntu setup /bin/sh is a soft link to /bin/dash !
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MEM_SIZE=1048576
depend()
{
use net
need scst
}
configure_memsize()
{
if [ -e /proc/sys/net/core/wmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max
fi
if [ -e /proc/sys/net/core/rmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max
fi
if [ -e /proc/sys/net/core/wmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default
fi
if [ -e /proc/sys/net/core/rmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default
fi
if [ -e /proc/sys/net/ipv4/tcp_mem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem
fi
if [ -e /proc/sys/net/ipv4/tcp_rmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem
fi
if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem
fi
}
start_server()
{
# configure_memsize
modprobe -q crc32c 2>/dev/null
modprobe -q crc32c-intel 2>/dev/null
modprobe iscsi-scst
/usr/local/sbin/iscsi-scstd
/usr/local/sbin/scstadmin -config /etc/scst.conf
}
stop_server()
{
killall iscsi-scstd
rmmod -w iscsi-scst
}
start()
{
ebegin "Starting iscsi"
start_server
eend 0
}
stop()
{
ebegin "Stopping iscsi"
stop_server
eend 0
}

View File

@@ -1,144 +0,0 @@
#!/bin/sh
#
# chkconfig: - 39 35
# description: Starts and stops the iSCSI target
#
# pidfile: /var/run/iscsi-scstd.pid
# config: /etc/iscsi-scstd.conf
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MEM_SIZE=1048576
SCST_CMD=/usr/local/sbin/scstadmin
SCST_CFG=/etc/scst.conf
# Additional modules to load/unload
ADD_MODULES="scst_vdisk scst"
configure_memsize()
{
if [ -e /proc/sys/net/core/wmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max
fi
if [ -e /proc/sys/net/core/rmem_max ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max
fi
if [ -e /proc/sys/net/core/wmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default
fi
if [ -e /proc/sys/net/core/rmem_default ]; then
echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default
fi
if [ -e /proc/sys/net/ipv4/tcp_mem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem
fi
if [ -e /proc/sys/net/ipv4/tcp_rmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem
fi
if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then
echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem
fi
}
RETVAL=0
start()
{
echo -n "Starting iSCSI target service: "
# configure_memsize
modprobe -q crc32c 2>/dev/null
modprobe -q crc32c-intel 2>/dev/null
modprobe iscsi-scst
for module in ${ADD_MODULES}; do
modprobe ${module}
done
daemon /usr/local/sbin/iscsi-scstd
# -d 0xFFFF
/usr/local/sbin/scstadmin -config /etc/scst.conf
RETVAL=$?
echo
return $RETVAL
}
stop()
{
echo -n "Stopping iSCSI target service: "
killall iscsi-scstd
rmmod -w iscsi-scst
RETVAL=$?
modprobe -r crc32c 2>/dev/null
for m in ${ADD_MODULES}; do
if [ -e /sys/module/$m ]; then
rmmod $m
fi
done
if [ $RETVAL -eq 0 ]; then
echo_success
else
echo_failure
fi
echo
return $RETVAL
}
restart()
{
stop
start
}
condrestart()
{
PID=`pidofproc iscsi-scstd`
if [ $PID ]; then
restart
fi
}
status()
{
PID=`pidofproc iscsi-scstd`
if [ ! $PID ]; then
echo "iSCSI target stopped"
exit 1
else
echo "iscsi-scstd (pid $PID) is running..."
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $?