Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 256821 Details for
Bug 347527
sys-block/iscsitarget-1.4.20.2 Version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
updated init.d script
ietd-init.d-2 (text/plain), 2.43 KB, created by
Igor Novgorodov
on 2010-12-10 10:38:00 UTC
(
hide
)
Description:
updated init.d script
Filename:
MIME Type:
Creator:
Igor Novgorodov
Created:
2010-12-10 10:38:00 UTC
Size:
2.43 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2008 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License, v2 or later ># $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d-2,v 1.1 2008/07/18 16:03:38 flameeyes Exp $ > >MEM_SIZE=1048576 >DAEMON=/usr/sbin/ietd >CONFIG_FILE=/etc/ietd.conf >PID_FILE=/var/run/ietd.pid >NAME="iSCSI Enterprise Target" > >ARGS="" >[ -n "$USER" ] && ARGS="${ARGS} --uid=${USER}" >[ -n "$GROUP" ] && ARGS="${ARGS} --gid=${GROUP}" >[ -n "$ISNS" ] && ARGS="${ARGS} --isns=${ISNS}" >[ -n "$PORT" ] && ARGS="${ARGS} --port=${PORT}" >[ -n "$ADDRESS" ] && ARGS="${ARGS} --address=${ADDRESS}" >[ -n "$DEBUGLEVEL" ] && ARGS="${ARGS} --debug=${DEBUGLEVEL}" > >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.ipv4.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 >} > >do_modules() { > msg="$1" > shift > modules="$1" > shift > opts="$@" > for m in ${modules}; do > ebegin "${msg} - ${m}" > modprobe ${opts} $m > ret=$? > eend $ret > [ $ret -ne 0 ] && return $ret > done > return 0 >} > >start() { > checkconfig || return 1 > do_modules 'Loading iSCSI-Target modules' 'iscsi_trgt' > ebegin "Starting ${NAME}" > start-stop-daemon --start --exec $DAEMON --quiet -- ${ARGS} > eend $? >} > >stop() { > ebegin "Removing ${NAME} devices" > # ugly, but ietadm does not allways provides correct exit values > RETURN="$(ietadm --op delete 2>&1)" > RETVAL=$? > if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then > eend 0 > else > eend 1 > eerror "ietadm failed - $RETURN" > return 1 > fi > > 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 ietd > rm -f $PID_FILE > do_modules 'Removing iSCSI-Target modules' 'iscsi_trgt' '-r' > return $? >} > ># 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 347527
:
256121
|
256123
|
256125
| 256821