From ad6cf32fe3de9cbdf507f524d1db737dd84257da Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 2 Jan 2013 22:04:14 +0000 Subject: [PATCH] fixed defect 3266 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14734 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 810984c79..11fa33df7 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1230,8 +1230,7 @@ sub plugin_command { $$progname=$oldprogname.": $modname instance"; 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{$_}}); + #if node doesn't, then it sorts out alphabetically. my @nodes = sort {($a =~ /(\d+)/ ? $1 : -1)[0] <=> ($b =~ /(\d+)/ ? $1 : -1)[0] || $a cmp $b } (keys %{$handler_hash{$_}}); $req->{node}=\@nodes; } @@ -1313,8 +1312,8 @@ sub plugin_command { if ($sock) { close $pfd; } 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{$_}}); + #if node doesn't, then it sorts out alphabetically. + 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";