Re-discover targets

This commit is contained in:
Jamie Cameron
2012-10-29 23:27:57 -07:00
parent cf2b37f910
commit 3617f9af97

View File

@@ -211,6 +211,10 @@ return \@rv;
sub create_iscsi_connection
{
my ($host, $port, $iface, $target, $method, $user, $pass) = @_;
# Re-discover targets, so that this function works when called remotely
&list_iscsi_targets($host, $port, $iface);
my $cmd = "$config{'iscsiadm'} -m node".
($target ? " -T ".quotemeta($target->{'name'}).":".
quotemeta($target->{'target'}) : "").