- src/ceph-osd-prestart.sh
- src/ceph-osd-prestart.sh
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
#!/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
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