mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-08-19 21:28:24 +08:00
Use print_info for "Detecting snapshots" message
The "Detecting snapshots ..." message was still a bare printf and bypassed the logging helpers added in #435. Use print_info so it carries the "grub-btrfs:" prefix; the trailing newline is handled by the helper.
This commit is contained in:
@@ -89,7 +89,7 @@ if ! type btrfs >/dev/null 2>&1; then print_info "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}" || print_error "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}" || print_error "grub-mkconfig_lib couldn't be found"
|
||||||
[[ "$(btrfs filesystem df / 2>&1)" == *"not a btrfs filesystem"* ]] && { print_info "Root filesystem isn't btrfs"; exit 0; }
|
[[ "$(btrfs filesystem df / 2>&1)" == *"not a btrfs filesystem"* ]] && { print_info "Root filesystem isn't btrfs"; exit 0; }
|
||||||
|
|
||||||
printf "Detecting snapshots ...\n" >&2 ;
|
print_info "Detecting snapshots ..."
|
||||||
|
|
||||||
## Submenu name
|
## Submenu name
|
||||||
distro=$(awk -F "=" '/^NAME=/ {gsub(/"/, "", $2); print $2}' /etc/os-release) # escape '
|
distro=$(awk -F "=" '/^NAME=/ {gsub(/"/, "", $2); print $2}' /etc/os-release) # escape '
|
||||||
|
|||||||
Reference in New Issue
Block a user