Index: libexec/rc/rc.d/zfskeys =================================================================== --- libexec/rc/rc.d/zfskeys +++ libexec/rc/rc.d/zfskeys @@ -50,7 +50,7 @@ echo "Key already loaded for $fs." elif keytest=$(zfs load-key -n -L "$kl" "$fs" 2>&1); then echo "Loading key for $fs from $kl.." - if ! keyload=$(timeout $zfskeys_timeout zfs load-key -L "$kl" "$fs" 2>&1) ; then + if ! keyload=$($timeout $zfskeys_timeout zfs load-key -L "$kl" "$fs" 2>&1) ; then if [ $? -eq 124 ]; then echo "Timed out loading key from $kl for $fs" else @@ -114,6 +114,12 @@ done } +if [ -x '/usr/bin/timeout' ]; then + timeout='/usr/bin/timeout' +else + timeout='' +fi + zfskeys_args=$(encode_args "$@") load_rc_config $name run_rc_command "$1"