add description of pacman command to snapper description

This commit is contained in:
James Barnett 2016-04-21 15:11:53 -05:00
parent e8f1671853
commit a54835d7ff
2 changed files with 4 additions and 2 deletions

View file

@ -1,9 +1,10 @@
#!/bin/bash
PACMAN_CMD=$(ps -C pacman -o args=)
PREFILE=/etc/snapper/.snap-pac-pre
if [ -f $PREFILE ]; then
SNAPPERPACPRE=$(cat $PREFILE)
snapper --config root create --cleanup-algorithm number --type post --pre-number $SNAPPERPACPRE --description "pacman posttransaction"
snapper --config root create --cleanup-algorithm number --type post --pre-number $SNAPPERPACPRE --description "pacman posttransaction ($PACMAN_CMD)"
rm $PREFILE
else
echo "WARNING: $PREFILE does not exist, so not performing post snapshot. If you are initially installing snap-pac, this is normal."

View file

@ -1,3 +1,4 @@
#!/bin/bash
snapper --config root create --type pre --cleanup-algorithm number --print-number --description "pacman pretransaction" > /etc/snapper/.snap-pac-pre
PACMAN_CMD=$(ps -C pacman -o args=)
snapper --config root create --type pre --cleanup-algorithm number --print-number --description "pacman pretransaction ($PACMAN_CMD)" > /etc/snapper/.snap-pac-pre