From dddcc7f3a9e3bc4fa2631abdf47929dd6933a79d Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Fri, 5 Jun 2015 17:31:43 -0600 Subject: [PATCH] ceph-build: better SUSE detection As was done in 18890d5a0351ffe4fc495e0d47e3a86e0a9cb7ad for radosgw-agent, update ceph-build's SUSE detection so we check for the "zypper" file directly on-disk. --- ceph-build/build/build_rpm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ceph-build/build/build_rpm b/ceph-build/build/build_rpm index 670bcc39..217e0358 100644 --- a/ceph-build/build/build_rpm +++ b/ceph-build/build/build_rpm @@ -1,16 +1,7 @@ #!/bin/bash set -ex -# Run only in RPM based systems -is_suse() { - if hash zypper 2>/dev/null; then - echo 1 - else - echo 0 - fi -} - -if [[ ! -f /etc/redhat-release && is_suse -eq 0 ]] ; then +if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then exit 0 fi -- 2.39.5