mirror of
https://github.com/zfsonlinux/zfs-auto-snapshot.git
synced 2024-11-22 16:13:57 +01:00
Fix SNAPNAME to contain the DATE if label is empty
When I didn't specify a `--label` on the commandline, the SNAPNAME was missing the $DATE component
This commit is contained in:
parent
39bce83e0f
commit
dc6f5ddcd9
@ -507,7 +507,7 @@ SNAPPROP="-o com.sun:auto-snapshot-desc='$opt_event'"
|
||||
DATE=$(date --utc +%F-%H%M)
|
||||
|
||||
# The snapshot name after the @ symbol.
|
||||
SNAPNAME="$opt_prefix${opt_label:+$opt_sep$opt_label-$DATE}"
|
||||
SNAPNAME="$opt_prefix${opt_label:+$opt_sep$opt_label}-$DATE"
|
||||
|
||||
# The expression for matching old snapshots. -YYYY-MM-DD-HHMM
|
||||
SNAPGLOB="$opt_prefix${opt_label:+?$opt_label}????????????????"
|
||||
|
Loading…
Reference in New Issue
Block a user