mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Deal with systems with no interface support
This commit is contained in:
@ -277,12 +277,16 @@ return $out;
|
||||
sub list_iscsi_ifaces
|
||||
{
|
||||
&clean_language();
|
||||
my $errtemp = &transname();
|
||||
my $out = &backquote_command(
|
||||
"$config{'iscsiadm'} -m iface -o show -P 1 2>/dev/null");
|
||||
"$config{'iscsiadm'} -m iface -o show -P 1 2>$errtemp");
|
||||
&reset_environment();
|
||||
my @lines = split(/\r?\n/, $out);
|
||||
my $err = &read_file_contents($errtemp);
|
||||
if ($?) {
|
||||
return $lines[0];
|
||||
return "Interfaces are not supported by this OpenISCSI version"
|
||||
if ($err =~ /Invalid\s+info\s+level/);
|
||||
return $err || $lines[0];
|
||||
}
|
||||
my @rv;
|
||||
my ($iface, $target);
|
||||
|
@ -65,10 +65,6 @@ if (ref($ifaces)) {
|
||||
[ [ undef, "<".$text{'conns_ifacedef'}.">" ],
|
||||
map { $_->{'name'} } @$ifaces ]));
|
||||
}
|
||||
else {
|
||||
print &ui_table_row($text{'conns_iface'},
|
||||
&text('conns_ifaceerr', $ifaces));
|
||||
}
|
||||
|
||||
print &ui_table_end();
|
||||
print &ui_form_end([ [ undef, $text{'conns_start'} ] ]);
|
||||
|
Reference in New Issue
Block a user