mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-10-20 02:42:03 +08:00
Updated readme to take openRC daemon into consideration
This commit is contained in:
@@ -107,14 +107,20 @@ use `systemctl list-units -t mount`.
|
|||||||
* You can view your change to `systemctl cat grub-btrfs.path`.
|
* You can view your change to `systemctl cat grub-btrfs.path`.
|
||||||
* To revert change use `systemctl revert grub-btrfs.path`.
|
* To revert change use `systemctl revert grub-btrfs.path`.
|
||||||
|
|
||||||
2. If you would like grub-btrfs menu to automatically update on system restart/shutdown:
|
2. If you would like grub-btrfs menu to automatically update on system restart/ shutdown:
|
||||||
[Look at this comment](https://github.com/Antynea/grub-btrfs/issues/138#issuecomment-766918328)
|
[Look at this comment](https://github.com/Antynea/grub-btrfs/issues/138#issuecomment-766918328)
|
||||||
Currently not implemented
|
Currently not implemented
|
||||||
##
|
##
|
||||||
#### OpenRC
|
#### OpenRC
|
||||||
* There is sadly no similar solution to the systemd service yet.
|
1. If you would like grub-btrfs menu to automatically update when a snapshot is created or deleted:
|
||||||
As a workaround it is possible to add a script to `/etc/local.d` to execute the snapshot menu update every time you shut down your system.
|
* Use `rc-config add grub-btrfsd default`, to start the grub-btrfsd daemon the next time the system boots.
|
||||||
To do so just add the following script as `/etc/local.d/grub-btrfs-update.stop`
|
* To start `grub-btrfsd` right now, run `rc-service grub-btrfsd start`
|
||||||
|
* `grub-btrfsd` automatically watches the snapshot directory of timeshift (/run/timeshift/backup/timeshift-btrfs/snapshots)
|
||||||
|
and updates the grub-menu when a change occurs.
|
||||||
|
* Currently untested for snapper
|
||||||
|
|
||||||
|
2. If you would like grub-btrfs menu to automatically update on system restart/ shutdown:
|
||||||
|
Just add the following script as `/etc/local.d/grub-btrfs-update.stop`
|
||||||
```
|
```
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
@@ -129,7 +135,9 @@ To do so just add the following script as `/etc/local.d/grub-btrfs-update.stop`
|
|||||||
bash -c 'if [ -s "${GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}/grub-btrfs.cfg" ]; then /etc/grub.d/41_snapshots-btrfs; else {GRUB_BTRFS_MKCONFIG:-grub-mkconfig} -o {GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}/grub.cfg; fi'
|
bash -c 'if [ -s "${GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}/grub-btrfs.cfg" ]; then /etc/grub.d/41_snapshots-btrfs; else {GRUB_BTRFS_MKCONFIG:-grub-mkconfig} -o {GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}/grub.cfg; fi'
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to run the menu update on startup instead, rename the file to `grub-btrfs-update.start`
|
* The extension ".stop" at the end of the filename indicates to locald that this script should be run at shutdown.
|
||||||
|
If you want to run the menu update on startup instead, rename the file to `grub-btrfs-update.start`
|
||||||
|
* Works for snapper and timeshift
|
||||||
|
|
||||||
##### Warning :
|
##### Warning :
|
||||||
by default, `grub-mkconfig` command is used.
|
by default, `grub-mkconfig` command is used.
|
||||||
|
|||||||
Reference in New Issue
Block a user