diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index cd88f0f..29f690e 100644 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -227,7 +227,11 @@ do_snapshots () # properties, flags, snapname, oldglob, [targets...] if [ "$(uname)" = "Darwin" ]; then GETOPT_BIN="$(brew --prefix gnu-getopt 2> /dev/null || echo /usr/local)/bin/getopt" else - GETOPT_BIN="getopt" + if [ "$(uname)" = "FreeBSD" ]; then + GETOPT_BIN="/usr/local/bin/getopt" + else + GETOPT_BIN="getopt" + fi fi GETOPT=$($GETOPT_BIN \