X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mount-latest-subvol;h=9bb324b918a20cd0a9357b7d125086f8506c2dfe;hb=77f3e699ab79d597d22fc052ed03d25cf0ad02da;hp=aa35efa5720bbb9573b44939719a7baec8dd74a2;hpb=93db0c16393fe75efef3167c1d2b332f50387c23;p=distro-setup diff --git a/mount-latest-subvol b/mount-latest-subvol index aa35efa..9bb324b 100644 --- a/mount-latest-subvol +++ b/mount-latest-subvol @@ -315,6 +315,8 @@ for vol in q a o i; do ### begin check if leaf is different, delete it if not ### if [[ -e /a/opt/btrfs-snapshots-diff/btrfs-snapshots-diff.py ]]; then + source /a/bin/distro-functions/src/package-manager-abstractions + pi python-jmespath # dependency parentid=$(btrfs sub show $leaf | awk '$1 == "Parent" && $2 == "UUID:" {print $3}') bsubs=(/mnt/root/btrbk/$vol.*) bsub= @@ -328,7 +330,7 @@ for vol in q a o i; do if [[ $bsub ]]; then tmp=$(mktemp) # in testing, same subvol is 136 bytes. allow some overhead - btrfs send --no-data -p $bsub $leaf | head -c 1000 > $tmp + btrfs send --no-data -p $bsub $leaf | head -c 1000 > $tmp || [[ $? == 141 ]] if (( $(stat -c%s $tmp) < 1000)); then # example output for an empty diff: # Found a valid Btrfs stream header, version 1