Skip to content

Instantly share code, notes, and snippets.

@linux4life798
Last active September 17, 2025 21:38
Show Gist options
  • Select an option

  • Save linux4life798/a857a7f33a04a4ce2d85da4144a91094 to your computer and use it in GitHub Desktop.

Select an option

Save linux4life798/a857a7f33a04a4ce2d85da4144a91094 to your computer and use it in GitHub Desktop.
# Craig added on Sep 17, 2025.
# /etc/apt/apt.conf.d/80snapper-boot
#
# This uses snapper to do pre and post snapshots of the "boot" config/volume.
# This mirrors what 80snapper config does for the "root" config/volume, but
# applies it to the "boot" config.
# See https://salsa.debian.org/debian/snapper/-/blob/debian/sid/debian/80snapper.
#
# When snapper is run without a config "-c root" argument it will default to the
# "root" config, which is how the original 80snapper script functions.
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770938
DPkg::Pre-Invoke { "if [ -e /etc/default/snapper ]; then . /etc/default/snapper; fi; if [ -x /usr/bin/snapper ] && [ ! x$DISABLE_APT_SNAPSHOT = 'xyes' ] && [ -e /etc/snapper/configs/boot ]; then rm -f /var/tmp/snapper-apt || true ; snapper -c boot create -d apt -c number -t pre -p > /var/tmp/snapper-apt || true ; snapper -c boot cleanup number || true ; fi"; };
DPkg::Post-Invoke { "if [ -e /etc/default/snapper ]; then . /etc/default/snapper; fi; if [ -x /usr/bin/snapper ] && [ ! x$DISABLE_APT_SNAPSHOT = 'xyes' ] && [ -e /var/tmp/snapper-apt ]; then snapper -c boot create -d apt -c number -t post --pre-number=`cat /var/tmp/snapper-apt` || true ; snapper -c boot cleanup number || true ; fi"; };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment