Be less overzealous about removing cached discovery results dev prod 0.0.12
authorQuentin Smith <quentin@mit.edu>
Sun, 12 Dec 2010 07:15:32 +0000 (02:15 -0500)
committerQuentin Smith <quentin@mit.edu>
Sun, 12 Dec 2010 07:15:32 +0000 (02:15 -0500)
xvm-iscsi-connect

index b0701d0..ede3b36 100755 (executable)
@@ -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