From: Alan J. Pippin Date: Mon, 11 Feb 2019 02:33:37 +0000 (-0700) Subject: Make logdir if it doesn't exist X-Git-Url: http://git.pippins.net/embedvideo/%24link?a=commitdiff_plain;h=c00e82d49cf65624af91725a57a27bbcb75d3f0d;p=zfs-ubuntu%2F.git Make logdir if it doesn't exist Change-Id: Idbfba60f25c6930984a1d5c48ef0223d58cb3638 --- diff --git a/zfs-rm-all-snaps b/zfs-rm-all-snaps index 73c0746..868bba5 100755 --- a/zfs-rm-all-snaps +++ b/zfs-rm-all-snaps @@ -15,7 +15,7 @@ zfs_pool=$1 snap_pattern=$2 if [[ -z "$zfs_pool" ]] || [[ -z "$snap_pattern" ]]; then - echo "Usage: $0 " + echo "Usage: $0 / " exit 1 fi diff --git a/zfs-scripts.conf.dist b/zfs-scripts.conf.dist index 40a7e4b..019ae87 100644 --- a/zfs-scripts.conf.dist +++ b/zfs-scripts.conf.dist @@ -16,6 +16,7 @@ mailx=/usr/bin/mailx # 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"