snapshots: adding pacman command line as description

This commit is contained in:
Vaskó László 2016-03-28 19:31:58 +02:00
parent eef77c8ded
commit 51c33eb865
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
PREFILE=/etc/snapper/.snap-pac-pre PREFILE=/etc/snapper/.snap-pac-pre
if [ -f $PREFILE ]; then if [ -f $PREFILE ]; then
SNAPPERPACPRE=$(cat $PREFILE) 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 "$(xargs -0 printf '%s ' < /proc/$PPID/cmdline)"
rm $PREFILE rm $PREFILE
else else
echo "WARNING: $PREFILE does not exist, so not performing post snapshot. If you are initially installing snap-pac, this is normal." 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,3 @@
#!/bin/bash #!/bin/bash
snapper --config root create --type pre --cleanup-algorithm number --print-number --description "pacman pretransaction" > /etc/snapper/.snap-pac-pre snapper --config root create --type pre --cleanup-algorithm number --print-number --description "$(xargs -0 printf '%s ' < /proc/$PPID/cmdline)" > /etc/snapper/.snap-pac-pre