From: Willem Jan Withagen Date: Tue, 18 Oct 2016 09:33:09 +0000 (+0200) Subject: tools/ceph-monstore-update-crush.sh: FreeBSD getopt is not compatible, use the one... X-Git-Tag: v11.1.0~607^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11525%2Fhead;p=ceph.git tools/ceph-monstore-update-crush.sh: FreeBSD getopt is not compatible, use the one from packages Signed-off-by: Willem Jan Withagen --- diff --git a/install-deps.sh b/install-deps.sh index 96d66219e065..a8ebda8f8e67 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -41,6 +41,7 @@ if [ x`uname`x = xFreeBSDx ]; then archivers/snappy \ ftp/curl \ misc/e2fsprogs-libuuid \ + misc/getopt \ textproc/expat2 \ textproc/libxml2 \ textproc/xmlstarlet \ diff --git a/src/tools/ceph-monstore-update-crush.sh b/src/tools/ceph-monstore-update-crush.sh index 1508f06ddaf0..73c6dd0bccf0 100755 --- a/src/tools/ceph-monstore-update-crush.sh +++ b/src/tools/ceph-monstore-update-crush.sh @@ -28,6 +28,12 @@ else exit 1 fi +if [ `uname` = FreeBSD ]; then + GETOPT=/usr/local/bin/getopt +else + GETOPT=getopt +fi + function osdmap_get() { local store_path=$1 local query=$2 @@ -90,7 +96,7 @@ EOF function main() { local temp - temp=$(getopt -o h --long verbose,help,mon-store:,out:,rewrite -n $0 -- "$@") || return 1 + temp=$($GETOPT -o h --long verbose,help,mon-store:,out:,rewrite -n $0 -- "$@") || return 1 eval set -- "$temp" local rewrite