mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Show full device name
This commit is contained in:
@@ -153,6 +153,12 @@ foreach my $l (@lines) {
|
||||
elsif ($l =~ /iSCSI\s+Session\s+State:\s+(\S+)/) {
|
||||
$conn->{'session'} = $1;
|
||||
}
|
||||
elsif ($l =~ /scsi(\d+)\s+Channel\s+(\d+)\s+Id\s+(\d+)\s+Lun:\s+(\d+)/) {
|
||||
$conn->{'scsihost'} = $1;
|
||||
$conn->{'scsichannel'} = $2;
|
||||
$conn->{'scsiid'} = $3;
|
||||
$conn->{'scsilun'} = $4;
|
||||
}
|
||||
elsif ($l =~ /Attached\s+scsi\s+disk\s+(\S+)/) {
|
||||
$conn->{'device'} = "/dev/$1";
|
||||
}
|
||||
@@ -161,6 +167,13 @@ foreach my $l (@lines) {
|
||||
$conn->{$1} = $2;
|
||||
}
|
||||
}
|
||||
foreach my $c (@rv) {
|
||||
my $dev = "/dev/disk/by-path/ip-$c->{'ip'}:$c->{'port'}-".
|
||||
"iscsi-$c->{'name'}:$c->{'target'}-lun-$c->{'scsilun'}";
|
||||
if (-e $dev) {
|
||||
$conn->{'longdevice'} = $dev;
|
||||
}
|
||||
}
|
||||
return \@rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,6 +164,7 @@ vconn_password_in=Client password
|
||||
vconn_none=None required
|
||||
vconn_device=Local device file
|
||||
vconn_device2=Local device name
|
||||
vconn_device3=Constant device name
|
||||
vconn_delete=Disconnect Connection
|
||||
vconn_users=Current users
|
||||
vconn_size=Disk size
|
||||
|
||||
@@ -52,6 +52,11 @@ if ($conn->{'device'}) {
|
||||
print &ui_table_row($text{'vconn_device2'},
|
||||
&mount::device_name($conn->{'device'}));
|
||||
|
||||
if ($conn->{'longdevice'}) {
|
||||
print &ui_table_row($text{'vconn_device3'},
|
||||
"<tt>$conn->{'longdevice'}</tt>");
|
||||
}
|
||||
|
||||
my @disks = &fdisk::list_disks_partitions();
|
||||
my ($disk) = grep { $_->{'device'} eq $conn->{'device'} } @disks;
|
||||
if ($disk) {
|
||||
|
||||
Reference in New Issue
Block a user