diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 0628022ab..810984c79 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1231,7 +1231,8 @@ sub plugin_command { unless ($handler_hash{$_} == 1) { #ok, if nodes have numbers, this sorts them numerically... roughly.. #if node doesn't, then it spews a message, need to fix - my @nodes = sort {($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0] || $a cmp $b } (keys %{$handler_hash{$_}}); + #my @nodes = sort {($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0] || $a cmp $b } (keys %{$handler_hash{$_}}); + my @nodes = sort {($a =~ /(\d+)/ ? $1 : -1)[0] <=> ($b =~ /(\d+)/ ? $1 : -1)[0] || $a cmp $b } (keys %{$handler_hash{$_}}); $req->{node}=\@nodes; } no strict "refs";