change PRE_POST to SNAPSHOT

This commit is contained in:
James Barnett 2018-01-17 21:21:07 -05:00
parent f9b2c62ab7
commit 65fdd716e0
No known key found for this signature in database
GPG key ID: E4B5E45AA3B8C5C3
2 changed files with 6 additions and 6 deletions

View file

@ -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 create the file \fI/etc/snap-pac/root.conf\fR. \fIsnap-pac\fR requires
and expects configuration files to end in \fI.conf\fR. 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 .RS 4
Perform pacman pre/post snapshots for this configuration. In other Perform pacman pre/post snapshots for this configuration. In other
words, if you want snapper to run before and after a pacman 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 .SS No snapshots are being taken when I run pacman
No snapper configurations are set up for snap-pac's pacman hooks. By default 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 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. See CONFIGURATION.
.SS After restoring snapshot from snap-pac, pacman database is locked .SS After restoring snapshot from snap-pac, pacman database is locked

View file

@ -68,7 +68,7 @@ for CONFIG in $SNAPPER_CONFIGS; do
CONFIG_FILE="/etc/snap-pac/$CONFIG.conf" CONFIG_FILE="/etc/snap-pac/$CONFIG.conf"
unset PRE_POST unset SNAPSHOT
unset PRE_DESCRIPTION unset PRE_DESCRIPTION
unset POST_DESCRIPTION unset POST_DESCRIPTION
unset CLEANUP_ALGORITHM unset CLEANUP_ALGORITHM
@ -76,12 +76,12 @@ for CONFIG in $SNAPPER_CONFIGS; do
[[ -f "$CONFIG_FILE" ]] && [[ -r "$CONFIG_FILE" ]] && source "$CONFIG_FILE" [[ -f "$CONFIG_FILE" ]] && [[ -r "$CONFIG_FILE" ]] && source "$CONFIG_FILE"
if [[ $CONFIG == "root" ]]; then if [[ $CONFIG == "root" ]]; then
PRE_POST=${PRE_POST=:-"yes"} SNAPSHOT=${SNAPSHOT=:-"yes"}
else else
PRE_POST=${PRE_POST:-"no"} SNAPSHOT=${SNAPSHOT:-"no"}
fi fi
[[ $PRE_POST == "no" ]] && continue [[ $SNAPSHOT == "no" ]] && continue
PRE_DESCRIPTION=${PRE_DESCRIPTION:-"$pacman_cmd"} PRE_DESCRIPTION=${PRE_DESCRIPTION:-"$pacman_cmd"}
POST_DESCRIPTION=${POST_DESCRIPTION:-"$pacman_cmd"} POST_DESCRIPTION=${POST_DESCRIPTION:-"$pacman_cmd"}