Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 318254 Details for
Bug 426744
openistgt -- an enterprise iscsi target port for FreeBSD
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
init.d script
openistgt-init.d (text/plain), 1.62 KB, created by
Adeel
on 2012-07-15 20:49:06 UTC
(
hide
)
Description:
init.d script
Filename:
MIME Type:
Creator:
Adeel
Created:
2012-07-15 20:49:06 UTC
Size:
1.62 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2010 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License, v2 or later > >MEM_SIZE=1048576 >DAEMON=/usr/bin/istgt >CONFIG_FILE=/etc/istgt/istgt.conf >PID_FILE=/var/run/istgt.pid >NAME="iSCSI Enterprise Target for FreeBSD" > >ARGS="" >[ -n "$MODE" ] && ARGS="${ARGS} -m ${MODE}" >[ -n "$FACILITY" ] && ARGS="${ARGS} -l ${FACILITY}" >[ -n "$DEBUGLEVEL" ] && ARGS="${ARGS} -D -t ${DEBUGLEVEL}" >[ -n "$CONFIG" ] && ARGS="${ARGS} -c ${CONFIG}" > > >depend() { > use net > after modules >} >checkconfig() { > if [ ! -f $CONFIG_FILE ]; then > eerror "Config file $CONFIG_FILE does not exist!" > return 1 > fi ># if [ -z "$DISABLE_MEMORY_WARNINGS" ]; then ># check_memsize ># fi >} > >check_memsize() { > local wr md sysctl_key v k > for wr in r w; do > for md in max default; do > sysctl_key="net.core.${wr}mem_${md}" > v="$(sysctl -n ${sysctl_key})" > if [ "${v}" -lt "${MEM_SIZE}" ]; then > ewarn "$sysctl_key ($v) is lower than recommended ${MEM_SIZE}" > fi > done > done > for wr in "" r w; do > sysctl_key="net.inet.tcp_${wr}mem" > set -- $(sysctl -n ${sysctl_key}) > for k in min default max ; do > if [ "${1}" -lt "${MEM_SIZE}" ]; then > ewarn "$sysctl_key:$k (${1}) is lower than recommended ${MEM_SIZE}" > fi > shift > done > done >} > >start() { > checkconfig || return 1 > ebegin "Starting ${NAME}" > start-stop-daemon --start --exec $DAEMON --quiet -- ${ARGS} > eend $? >} > >stop() { > ebegin "Stopping ${NAME}" > start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE > ret=$? > eend $ret > [ $ret -ne 0 ] && return 1 > > # ugly, but pid file is not removed by openistgt > rm -f $PID_FILE >} > ># vim: tw=72:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 426744
:
318252
| 318254 |
318256
|
318258
|
318260