diff --git a/snap-pac-clean b/snap-pac-clean index 04ce082..0d2fab0 100755 --- a/snap-pac-clean +++ b/snap-pac-clean @@ -18,4 +18,5 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +rm /usr/share/libalpm/hooks.bin/snap-pac/.pre* echo "NOTE: No post snapshot will be performed for this transaction, since you are removing the pacman hooks." diff --git a/snap-pac.conf b/snap-pac.conf index 4a93cb2..5645b54 100644 --- a/snap-pac.conf +++ b/snap-pac.conf @@ -13,7 +13,3 @@ POST_DESCRIPTION="$(ps -C pacman -o args=)" # Snapper cleanup algorithm to use. CLEANUP_ALGORITHM="number" - -# Prefix of the file that contains the pre snapshot number. Appended by the name -# of the specific configuration. Generally shouldn't want to change this. -PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre" diff --git a/snapper-post b/snapper-post index b21e33e..7b0fe68 100755 --- a/snapper-post +++ b/snapper-post @@ -22,6 +22,7 @@ source /etc/snap-pac.conf +PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre" for x in $CONFIGS; do if [ -f $PREFILE_PREFIX"_"$x ]; then SNAPPERPACPRE=$(cat $PREFILE_PREFIX"_"$x) diff --git a/snapper-pre b/snapper-pre index 3ab5776..e086bd2 100755 --- a/snapper-pre +++ b/snapper-pre @@ -22,6 +22,7 @@ source /etc/snap-pac.conf +PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre" for x in $CONFIGS; do snapper --config $x create --type pre --cleanup-algorithm number --print-number --description "$POST_DESCRIPTION" > $PREFILE_PREFIX"_"$x done