diff --git a/10-update_grub.conf b/10-update_grub.conf new file mode 100644 index 0000000..84a506c --- /dev/null +++ b/10-update_grub.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPost=/usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg diff --git a/README.md b/README.md index 4c452cd..9f952e7 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,15 @@ Generate grub.cfg (on Arch linux use grub-mkconfig -o /boot/grub/grub.cfg ) grub-btrfs automatically generates snapshots entries. You will see it appear differents entries (e.g : Snapshot: 2018-01-03 15:08:41 @test1 ) +## +### Automatically update grub + +If you would like grub to automatically update when Snapper timeline snapshots and cleanups occur, simply install `10-update_grub.conf` in the following locations: + +- `/etc/systemd/system/snapper-timeline.service.d/` +- `/etc/systemd/system/snapper-cleanup.service.d/` + +Once the configuration files are in place, `systemctl daemon-reload` should be run to reload the units and make the changes active. ## ### Discussion