From: Ken Dreyer Date: Fri, 5 Jun 2015 23:31:43 +0000 (-0600) Subject: ceph-build: better SUSE detection X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dddcc7f3a9e3bc4fa2631abdf47929dd6933a79d;p=ceph-build.git 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. --- 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