Add systemd service configuration for grub updating (#38)

* Add systemd service configuration for grub updating

This configuration file causes `update-grub` to be run after
Snapper's cleanup and timeline services are run by systemd

* Make invoked command more universal

* Note the need to run systemctl daemon-reload
This commit is contained in:
Nathan Parsons
2018-02-03 21:50:40 +01:00
committed by Antynea
parent ca51d74265
commit 23ddb063cb
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
[Service]
ExecStartPost=/usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg
+9
View File
@@ -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