From 65fdd716e0982c1fcb3dfd803c9a68f44019a929 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Wed, 17 Jan 2018 21:21:07 -0500 Subject: [PATCH] change PRE_POST to SNAPSHOT --- man8/snap-pac.8 | 4 ++-- scripts/snap-pac | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/man8/snap-pac.8 b/man8/snap-pac.8 index 9eb2f85..5504ef4 100644 --- a/man8/snap-pac.8 +++ b/man8/snap-pac.8 @@ -61,7 +61,7 @@ to. For example, for the snapper configuration named \fIroot\fR, create the file \fI/etc/snap-pac/root.conf\fR. \fIsnap-pac\fR requires and expects configuration files to end in \fI.conf\fR. -\fBPRE_POST=\fR\fB\fIyes\fR\fR\fB or \fR\fB\fIno\fR\fR +\fBSNAPSHOT=\fR\fB\fIyes\fR\fR\fB or \fR\fB\fIno\fR\fR .RS 4 Perform pacman pre/post snapshots for this configuration. In other words, if you want snapper to run before and after a pacman @@ -182,7 +182,7 @@ That's the default behavior. See \fBCONFIGURATION\fR. .SS No snapshots are being taken when I run pacman No snapper configurations are set up for snap-pac's pacman hooks. By default snap-pac will take snapshots for the root configuration and any other -configuration which has PACMAN_PRE_POST set to yes in its configuration file. +configuration which has SNAPSHOT set to yes in its configuration file. See CONFIGURATION. .SS After restoring snapshot from snap-pac, pacman database is locked diff --git a/scripts/snap-pac b/scripts/snap-pac index 3ab3a76..8c270d5 100755 --- a/scripts/snap-pac +++ b/scripts/snap-pac @@ -68,7 +68,7 @@ for CONFIG in $SNAPPER_CONFIGS; do CONFIG_FILE="/etc/snap-pac/$CONFIG.conf" - unset PRE_POST + unset SNAPSHOT unset PRE_DESCRIPTION unset POST_DESCRIPTION unset CLEANUP_ALGORITHM @@ -76,12 +76,12 @@ for CONFIG in $SNAPPER_CONFIGS; do [[ -f "$CONFIG_FILE" ]] && [[ -r "$CONFIG_FILE" ]] && source "$CONFIG_FILE" if [[ $CONFIG == "root" ]]; then - PRE_POST=${PRE_POST=:-"yes"} + SNAPSHOT=${SNAPSHOT=:-"yes"} else - PRE_POST=${PRE_POST:-"no"} + SNAPSHOT=${SNAPSHOT:-"no"} fi - [[ $PRE_POST == "no" ]] && continue + [[ $SNAPSHOT == "no" ]] && continue PRE_DESCRIPTION=${PRE_DESCRIPTION:-"$pacman_cmd"} POST_DESCRIPTION=${POST_DESCRIPTION:-"$pacman_cmd"}