fix sort luns numerically
This commit is contained in:
parent
ac809e4c71
commit
3797983e1a
|
|
@ -400,7 +400,7 @@ sub freenas_get_first_available_lunid {
|
|||
push(@luns, $item->{'iscsi_lunid'}) if ($item->{'iscsi_target'} == $target_id);
|
||||
}
|
||||
|
||||
my @sorted_luns = sort(@luns);
|
||||
my @sorted_luns = sort { $a <=> $b } @luns;
|
||||
my $lun_id = 0;
|
||||
|
||||
# find the first hole, if not, give the +1 of the last lun
|
||||
|
|
|
|||
Loading…
Reference in New Issue