From f4e93057b191108b25d938a378dd7ce0a15b4b16 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Wed, 17 Jul 2013 03:07:26 +0000 Subject: [PATCH] fixing bug 3653 on sles and ubuntu. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16985 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 0e41dc7be..b4a018698 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 aa4dcda2f..f3b634930 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}});