diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 9490e1b29..f7dcb3a01 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -269,6 +269,17 @@ stop_scst() { return 1 fi + # Disable iSCSI + if [ -f /sys/kernel/scst_tgt/targets/iscsi/enabled ]; then + echo 0 > /sys/kernel/scst_tgt/targets/iscsi/enabled + fi + + # Turn off any cluster_mode in parallel + for cm in /sys/kernel/scst_tgt/devices/*/cluster_mode ; do + echo 0 > "$cm" & + done + wait + unload_scst }