Make logdir if it doesn't exist
[zfs-ubuntu/.git] / zfs-scripts.conf.dist
index 7b021f6db8cfdefeead1b3de4220a3a5bfabf93c..019ae870353bcf9fbc442d316ce974e2df75c28f 100644 (file)
@@ -5,6 +5,9 @@
 # setup your path here to find all the binaries the ZFS scripts call
 PATH=/usr/sbin:/sbin:/etc/bin:.:$PATH
 
+# set our hostname
+hostname=`hostname`
+
 # specify the path to the zfs binary
 zfs=/sbin/zfs
 
@@ -13,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"