On Tue, 2012-10-09 at 14:52 -0700, Nicholas A. Bellinger wrote: > On Tue, 2012-10-09 at 21:19 +0000, Nicholas A. Bellinger wrote: > > From: Hannes Reinecke <hare@xxxxxxx> > > > > config/iscsi doesn't need to exist, yet the module can be loaded. > > > > (nab: Fix shutdown_lio_mod() to add missing 'if -ne' investor to > > work properly, and add some code to scripts/rc.target) > > > > Signed-off-by: Hannes Reinecke <hare@xxxxxxx> > > Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxxxxxxxx> > > --- > > lio-py/lio_node.py | 17 +++++++++-------- > > scripts/rc.target | 2 +- > > scripts/rc.target.suse | 5 +++-- > > 3 files changed, 13 insertions(+), 11 deletions(-) > > <SNIP> > > diff --git a/scripts/rc.target.suse b/scripts/rc.target.suse > index a3806fa..5aa5283 100644 > --- a/scripts/rc.target.suse > +++ b/scripts/rc.target.suse > @@ -214,7 +214,7 @@ function shutdown_fabrics() { > } > > function shutdown_lio_mod () { > - if -ne lsmod | grep -q iscsi_target_mod ; then > + if ! lsmod | grep -q iscsi_target_mod ; then > echo -n $"Unloading LIO-Target/ConfigFS fabric: " > ${LIO_NODE} --unload > rc_status -v > > > -- And one more to make rc.target.suse:shutdown_lio_mod() follow rc.target: diff --git a/scripts/rc.target.suse b/scripts/rc.target.suse index 5aa5283..c812430 100644 --- a/scripts/rc.target.suse +++ b/scripts/rc.target.suse @@ -215,10 +215,12 @@ function shutdown_fabrics() { function shutdown_lio_mod () { if ! lsmod | grep -q iscsi_target_mod ; then - echo -n $"Unloading LIO-Target/ConfigFS fabric: " - ${LIO_NODE} --unload - rc_status -v - fi + return 0 + fi + + echo -n $"Unloading LIO-Target/ConfigFS fabric: " + ${LIO_NODE} --unload + rc_status -v } function unload_tcm_mod() { -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html