-#/bin/bash
+#!/bin/bash
# Author: Carl Baldwin & Alan Pippin
# Description: This script replicates a remote zfs filesystem to a local zfs pool.
# Create the remote lockdir before continuing with the replicate
# Spinlock on creating the lock
maxsleeptime=60
-maxattempts=100
+maxattempts=500
attempts=0
while true; do
ssh $remote mkdir "$lockdir" >/dev/null 2>&1