From patchwork Wed May 16 14:17:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 159678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 6C557B6FFD for ; Thu, 17 May 2012 00:17:53 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SUf2p-0006Vg-Nh; Wed, 16 May 2012 14:17:39 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SUf2n-0006VO-CZ for kernel-team@lists.ubuntu.com; Wed, 16 May 2012 14:17:37 +0000 Received: from 2-230-238-136.ip204.fastwebnet.it ([2.230.238.136] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SUf2n-00034q-7v for kernel-team@lists.ubuntu.com; Wed, 16 May 2012 14:17:37 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: check for PAE on x86 systems only Date: Wed, 16 May 2012 16:17:35 +0200 Message-Id: <1337177855-10684-2-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1337177855-10684-1-git-send-email-paolo.pisati@canonical.com> References: <1337164314-7330-1-git-send-email-paolo.pisati@canonical.com> <1337177855-10684-1-git-send-email-paolo.pisati@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@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.