From 53def88477b3f50e129e0cdad7036059414919eb Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Mon, 9 May 2011 17:49:45 -0700 Subject: [PATCH] LU-298 Improve check for dpkg system. Use lsb_release id (Ubuntu, Debian, RedHatEnterpriseServer, etc.) to determine if the system uses dpkg, instead of just checking for the existence of the dpkg binary. For example, some people do install dpkg on their RHEL systems for various reasons. Change-Id: I74db5277cb2db00927b74b652e7945bd95bca093 Signed-off-by: Christopher J. Morrone Reviewed-on: http://review.whamcloud.com/519 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Brian J. Murrell Reviewed-by: Chris Gearing Reviewed-by: Oleg Drokin --- build/autoconf/lustre-build-linux.m4 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index 188e805..0860b8b 100644 --- a/build/autoconf/lustre-build-linux.m4 +++ b/build/autoconf/lustre-build-linux.m4 @@ -708,11 +708,14 @@ AS_VAR_POPDEF([ac_Header])dnl AC_DEFUN([LB_USES_DPKG], [ AC_MSG_CHECKING([if this distro uses dpkg]) -if dpkg --version >/dev/null; then - AC_MSG_RESULT([yes]) - uses_dpkg=yes -else - AC_MSG_RESULT([no]) - uses_dpkg=no -fi +case `lsb_release -i -s 2>/dev/null` in + Ubuntu | Debian) + AC_MSG_RESULT([yes]) + uses_dpkg=yes + ;; + *) + AC_MSG_RESULT([no]) + uses_dpkg=no + ;; +esac ]) -- 1.8.3.1