mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-08-24 09:13:15 +08:00
Merge pull request #223 from S-trace/fix_silent_failure
Fix silent update-grub failure if root FS is not supported by GRUB2
This commit is contained in:
@@ -47,8 +47,7 @@ grub_btrfs_config="${sysconfdir}/default/grub-btrfs/config"
|
|||||||
if ! type btrfs >/dev/null 2>&1; then exit 0; fi # btrfs-progs isn't installed
|
if ! type btrfs >/dev/null 2>&1; then exit 0; fi # btrfs-progs isn't installed
|
||||||
[[ -f "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" ]] && . "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" || exit 0 # grub-mkconfig_lib couldn't be found
|
[[ -f "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" ]] && . "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" || exit 0 # grub-mkconfig_lib couldn't be found
|
||||||
# Root filesystem isn't btrfs
|
# Root filesystem isn't btrfs
|
||||||
root_fs=$(${grub_probe} --target="fs" / 2>/dev/null)
|
[[ "$(${grub_probe} --target="fs" / 2>/dev/null)" != "btrfs" ]] && exit 0
|
||||||
[[ "$root_fs" != "btrfs" ]] && exit 0
|
|
||||||
|
|
||||||
## Error Handling
|
## Error Handling
|
||||||
print_error()
|
print_error()
|
||||||
|
|||||||
Reference in New Issue
Block a user