]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/scripts:"FreeBSD getopt is not compatible, use the one from packages" 13260/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 4 Feb 2017 22:09:02 +0000 (23:09 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sat, 4 Feb 2017 22:09:02 +0000 (23:09 +0100)
 - src/ceph-osd-prestart.sh
 - src/ceph-osd-prestart.sh

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/ceph-osd-prestart.sh
src/ceph-post-file.in

index 2e45724299c05da48d929ad95f841a29289762b6..f946bf43b305befecdbc05dec0ecadb60048d5ee 100644 (file)
@@ -1,6 +1,12 @@
 #!/bin/sh
 
-eval set -- "$(getopt -o i: --long id:,cluster: -- $@)"
+if [ `uname` = FreeBSD ]; then
+  GETOPT=/usr/local/bin/getopt
+else
+  GETOPT=getopt
+fi
+
+eval set -- "$(${GETOPT} -o i: --long id:,cluster: -- $@)"
 
 while true ; do
        case "$1" in
index 3c9884a149991c1d3ec619f348ea5cd359c25c0a..8a88a03bd4c828e9ba0948bec9667f50e497fbbd 100755 (executable)
@@ -53,7 +53,13 @@ description=""
 user="`whoami`@`hostname -f`"
 remote="postfile@drop.ceph.com"
 
-ARGS=$(getopt -n "ceph-post-file" -o 'd:u:hk:i:r:' -l "description:,user:,help,known-hosts:,remote:" -- "$@")
+if [ `uname` = FreeBSD ]; then
+  GETOPT=/usr/local/bin/getopt
+else
+  GETOPT=getopt
+fi
+
+ARGS=$(${GETOPT} -n "ceph-post-file" -o 'd:u:hk:i:r:' -l "description:,user:,help,known-hosts:,remote:" -- "$@")
 eval set -- $ARGS
 
 while true; do