From c0aeae7dd1dde7fb2f771935e4ee0a53a0a081d2 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Wed, 17 Jul 2013 02:55:13 +0000 Subject: [PATCH] fixing bug 3653 on sles and ubuntu. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16984 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/sles/genimage | 6 +++--- xCAT-server/share/xcat/netboot/ubuntu/genimage | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 06e927379..a619a80e0 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -316,7 +316,7 @@ unless ($onlyinitrd) { } my $index=1; my $pass; - foreach $pass (sort (keys(%extra_hash))) { + foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) { foreach (keys(%{$extra_hash{$pass}})) { if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;} my $whole_path="$srcdir_otherpkgs/$_"; @@ -393,7 +393,7 @@ unless ($onlyinitrd) { my %pkg_hash=imgutils::get_package_names($pkglist); my $index=1; - foreach $pass (sort (keys(%pkg_hash))) { + foreach $pass (sort {$a <=> $b} (keys(%pkg_hash))) { $pkgnames = ""; $group_pkgnames = ""; foreach (keys(%{$pkg_hash{$pass}})) { @@ -472,7 +472,7 @@ unless ($onlyinitrd) { } } - foreach $pass (sort (keys(%extra_hash))) { + foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) { my $index=1; #remove the old repository for extra packages diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index d3ee7f654..965de17a2 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -263,7 +263,7 @@ unless ($onlyinitrd) { my %pkg_hash=imgutils::get_package_names($pkglist); my $index=1; my $pass; - foreach $pass (sort (keys(%pkg_hash))) { + foreach $pass (sort {$a <=> $b} (keys(%pkg_hash))) { my $pkgnames = ""; foreach (keys(%{$pkg_hash{$pass}})) { if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;} @@ -355,7 +355,7 @@ unless ($onlyinitrd) { if (keys(%extra_hash) > 0) { my $index=1; - foreach $pass (sort (keys(%extra_hash))) { + foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) { foreach (keys(%{$extra_hash{$pass}})) { if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;} $index++; @@ -365,7 +365,7 @@ unless ($onlyinitrd) { } $index--; - foreach $pass (sort (keys(%extra_hash))) { + foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) { my $envlist; if(exists($extra_hash{$pass}{ENVLIST})){ $envlist = join(' ', @{$extra_hash{$pass}{ENVLIST}});