Change-Id: Idbfba60f25c6930984a1d5c48ef0223d58cb3638
snap_pattern=$2
if [[ -z "$zfs_pool" ]] || [[ -z "$snap_pattern" ]]; then
snap_pattern=$2
if [[ -z "$zfs_pool" ]] || [[ -z "$snap_pattern" ]]; then
- echo "Usage: $0 <pool> <snapshot pattern>"
+ echo "Usage: $0 <pool>/<filesystem> <snapshot pattern>"
# specify the path to the logdir the ZFS scripts should dump their logs to
logdir="/var/log/zfs"
# specify the path to the logdir the ZFS scripts should dump their logs to
logdir="/var/log/zfs"
+[[ ! -d "$logdir" ]] && mkdir "$logdir"
# specify the name of the lockdir used when performing ZFS admin operations
lockdir="/tmp/zfs-admin-lock"
# specify the name of the lockdir used when performing ZFS admin operations
lockdir="/tmp/zfs-admin-lock"