From: Quentin Smith Date: Sun, 12 Dec 2010 07:15:32 +0000 (-0500) Subject: Be less overzealous about removing cached discovery results X-Git-Tag: 0.0.12^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/xvm-iscsi-config.git/commitdiff_plain/refs/heads/prod?ds=sidebyside Be less overzealous about removing cached discovery results --- diff --git a/xvm-iscsi-connect b/xvm-iscsi-connect index b0701d0..ede3b36 100755 --- a/xvm-iscsi-connect +++ b/xvm-iscsi-connect @@ -43,9 +43,9 @@ for node in $bad_nodes; do echo "Removing $node" # Remove the node entry - rm $node; + rm $node # Remove the cached results of the discovery so iscsiadm doesn't # get confused - find /etc/iscsi/send_targets -lname "${node%/*}" -delete + find /etc/iscsi/send_targets -lname "${node%/*}" -name "*,${node##*/}" -print -delete done