mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-04 04:35:00 +08:00
grub-btrfs: Do root fs detection with btrfs progs
Fix: #266 #255 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
This commit is contained in:
@@ -76,7 +76,7 @@ done
|
||||
[[ "${GRUB_BTRFS_DISABLE,,}" == "true" ]] && print_error "GRUB_BTRFS_DISABLE is set to true (default=false)"
|
||||
if ! type btrfs >/dev/null 2>&1; then print_error "btrfs-progs isn't installed"; fi
|
||||
[[ -f "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" ]] && . "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" || print_error "grub-mkconfig_lib couldn't be found"
|
||||
[[ "$(${grub_probe} --target="fs" / 2>/dev/null)" != "btrfs" ]] && print_error "Root filesystem isn't btrfs"
|
||||
[[ "$(btrfs filesystem df / 2>&1)" == *"not a btrfs filesystem"* ]] && print_error "Root filesystem isn't btrfs"
|
||||
|
||||
printf "Detecting snapshots ...\n" >&2 ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user