From e08109fd0a6de1be35a4184ca3501dfd164f8fa7 Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 19 Dec 2012 16:40:29 +0000 Subject: [PATCH] fixed a problem that xcatd gives warning when sorting nodes git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14687 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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";