From 473e51d89cc4b2e555b5a3d3e738b1122554d24c Mon Sep 17 00:00:00 2001 From: Kevin McCormick Date: Thu, 4 Aug 2016 16:24:08 -0700 Subject: [PATCH] split snapshot/syslog "tag" to independent values --- backup-zfs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backup-zfs b/backup-zfs index a6d200c..32c988c 100755 --- a/backup-zfs +++ b/backup-zfs @@ -1,5 +1,6 @@ #!/bin/bash # backup-zfs: use zfs send/recv to push/pull snapshots +prog="$(basename "$0")" usage() { echo "$(basename "$0") [-hvq] [-t tag] [-k keep] [-d dateopts] [srchost:]srcfs [desthost:]destfs" >&2 @@ -16,7 +17,7 @@ usage() { # log to syslog; if verbose or on a tty, also to stdout # usage: log msg log() { - logger -t $tag -- "$@" + logger -t "$prog" -- "$@" if ! $quiet && [[ -t 1 ]] || $verbose ; then echo "$@" >&2 fi @@ -52,7 +53,7 @@ ZFS() { ### ### defaults ### -tag=backup-zfs +tag="$prog" dateopts="+%F_%T" keep=5 verbose=false