Skip to content

Commit

Permalink
grub-btrfs: Improve variable defaults
Browse files Browse the repository at this point in the history
Fix #244

Signed-off-by: Pascal Jäger <[email protected]>
  • Loading branch information
Schievel1 committed Dec 6, 2022
1 parent 29ec43e commit f0ed56d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion 41_snapshots-btrfs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ grub_directory=${GRUB_BTRFS_GRUB_DIRNAME:-"/boot/grub"}
## Customize BOOT directory, where kernels/initrams/microcode is saved.
boot_directory=${GRUB_BTRFS_BOOT_DIRNAME:-"/boot"}
## Customize GRUB-BTRFS.cfg directory, where "grub-btrfs.cfg" file is saved
grub_btrfs_directory=${GRUB_BTRFS_GBTRFS_DIRNAME:-"/boot/grub"}
grub_btrfs_directory=${GRUB_BTRFS_GBTRFS_DIRNAME:-${grub_directory}}
## Customize directory where "grub-btrfs.cfg" file is searched for by grub
grub_btrfs_search_directory=${GRUB_BTRFS_GBTRFS_SEARCH_DIRNAME:-"\${prefix}"}
## Password protection management for submenu
Expand Down
7 changes: 3 additions & 4 deletions config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

GRUB_BTRFS_VERSION=4.12-master-2022-12-04T21:11:00+00:00
GRUB_BTRFS_VERSION=4.12-improve-config-2022-12-05T20:15:10+00:00

# Disable grub-btrfs.
# Default: "false"
Expand Down Expand Up @@ -88,7 +88,6 @@ GRUB_BTRFS_IGNORE_PREFIX_PATH=("var/lib/docker" "@var/lib/docker" "@/var/lib/doc
#GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="true"

# Location of the folder containing the "grub.cfg" file.
# Use by grub-btrfs to save the file "grub-btrfs.cfg".
# Might be grub2 on some systems.
# For example, on Fedora with EFI : "/boot/efi/EFI/fedora"
# Default: "/boot/grub"
Expand All @@ -100,10 +99,10 @@ GRUB_BTRFS_IGNORE_PREFIX_PATH=("var/lib/docker" "@var/lib/docker" "@/var/lib/doc
#GRUB_BTRFS_BOOT_DIRNAME="/boot"

# Location where grub-btrfs.cfg should be saved.
# Some distributions (like OpenSuSE) store those file at the snapshot directory
# Some distributions (like OpenSuSE) store those files at the snapshot directory
# instead of boot. Be aware that this direcory must be available for grub during
# startup of the system.
# Default: "/boot/grub"
# Default: $GRUB_BTRFS_GRUB_DIRNAME
#GRUB_BTRFS_GBTRFS_DIRNAME="/boot/grub"

# Location of the directory where Grub searches for the grub-btrfs.cfg file.
Expand Down
4 changes: 2 additions & 2 deletions manpages/grub-btrfs.8.man
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "grub-btrfs" "8"
.TH "grub-btrfs" "1"

.SH "NAME"
.PP
Expand Down Expand Up @@ -185,7 +185,7 @@ startup of the system.
.IP \(em 4
Default: “/boot/grub”
.IP \(em 4
Example GRUB\d\s-2BTRFS\s+2\u\d\s-2GBTRFS\s+2\u\d\s-2DIRNAME\s+2\u=“/boot/grub”
Example: \fCGRUB_BTRFS_GBTRFS_DIRNAME="/.snapshots"\fP

.SS "\fCGRUB_BTRFS_GBTRFS_SEARCH_DIRNAME\fP"
.PP
Expand Down
6 changes: 2 additions & 4 deletions manpages/grub-btrfs.8.org
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ Used by "grub-btrfs" to detect the boot partition and the location of kernels, i

*** ~GRUB_BTRFS_GRUB_DIRNAME~
Location of the folder containing the "grub.cfg" file.
Used by grub-btrfs to save the file "grub-btrfs.cfg".
Might be grub2 on some systems.
For example, on Fedora with EFI : "/boot/efi/EFI/fedora"
- Default: "/boot/grub"
Expand All @@ -134,8 +133,8 @@ For example, on Fedora with EFI : "/boot/efi/EFI/fedora"
Some distributions (like OpenSuSE) store those file at the snapshot directory
instead of boot. Be aware that this direcory must be available for grub during
startup of the system.
- Default: "/boot/grub"
- Example GRUB_BTRFS_GBTRFS_DIRNAME="/boot/grub"
- Default: $GRUB_BTRFS_GRUB_DIRNAME
- Example: ~GRUB_BTRFS_GBTRFS_DIRNAME="/.snapshots"~

*** ~GRUB_BTRFS_GBTRFS_SEARCH_DIRNAME~
Location of the directory where Grub searches for the grub-btrfs.cfg file.
Expand All @@ -148,7 +147,6 @@ installed. (like /boot/grub, /boot/efi/grub))
with `\` before the `$`
- Example: GRUB_BTRFS_GBTRFS_SEARCH_DIRNAME="\${prefix}"


*** ~GRUB_BTRFS_MKCONFIG~
Name/path of the command to generate the grub menu, used by "grub-btrfs.service"
Might be 'grub2-mkconfig' on some systems (e.g. Fedora)
Expand Down

0 comments on commit f0ed56d

Please sign in to comment.