<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#CCCCCC">
<div class="moz-cite-prefix">On 05/23/2014 08:35 PM, Ritesh Raj
Sarraf wrote:<br>
</div>
<blockquote cite="mid:537F63AC.3020101@debian.org" type="cite">
<pre wrap="">I need to verify that. I'm not very sure how it would really behave.
What exactly is your requirement ? Do you want the init script to exit
clean irrespective of the module state ?
</pre>
</blockquote>
<br>
Hey Craig,<br>
<br>
By the way, that is not the init scirpt that we ship in Debian. And
for the one that we ship, We are handling your case, as in your
rmmod --wait option.<br>
<br>
<br>
# check if the module is loaded at all<br>
lsmod | grep -q iscsi_trgt<br>
RETVAL=$?<br>
if [ $RETVAL = "0" ] ; then<br>
<br>
for i in $(seq $ISCSITARGET_MAX_SLEEP); do<br>
log_daemon_msg "Removing iSCSI enterprise
target modules: "<br>
modprobe -r iscsi_trgt<br>
RETVAL=$?<br>
if [ $RETVAL = "0" ]; then<br>
break<br>
fi<br>
# give iet some time to finish processing<br>
sleep 1<br>
done<br>
<br>
modprobe -r crc32c 2>/dev/null<br>
if [ $RETVAL = "0" ]; then<br>
log_end_msg 0<br>
else<br>
log_end_msg 1<br>
exit $RETVAL<br>
fi<br>
fi<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ritesh Raj Sarraf | <a class="moz-txt-link-freetext" href="http://people.debian.org/~rrs">http://people.debian.org/~rrs</a>
Debian - The Universal Operating System
</pre>
</body>
</html>