From patchwork Wed May 16 14:17:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: UBUNTU: check for PAE on x86 systems only Date: Wed, 16 May 2012 04:17:35 -0000 From: Paolo Pisati X-Patchwork-Id: 159678 Message-Id: <1337177855-10684-2-git-send-email-paolo.pisati@canonical.com> To: kernel-team@lists.ubuntu.com And while here, use STDERR for printing. Signed-off-by: Paolo Pisati --- debian/control-scripts/preinst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/control-scripts/preinst b/debian/control-scripts/preinst index 32b4fc2..9723776 100644 --- a/debian/control-scripts/preinst +++ b/debian/control-scripts/preinst @@ -90,10 +90,13 @@ die "Pre inst Internal error. Aborting." unless $version; exit 0 if $ARGV[0] =~ /abort-upgrade/; exit 1 unless $ARGV[0] =~ /(install|upgrade)/; -system ("grep -q ' pae ' /proc/cpuinfo"); -if ($?) { - print "This kernel does not support a non-PAE CPU.\n"; - exit 1; +$arch = `uname -i`; +if ($arch =~ m/86/) { + system ("grep -q ' pae ' /proc/cpuinfo"); + if ($?) { + print STDERR "This kernel does not support a non-PAE CPU.\n"; + exit 1; + } } # remove multiple leading slashes; make sure there is at least one.