From d8c665cf2a89eeda6839ba9d7c978d879cdad22e Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Sun, 13 Aug 2023 12:09:21 +0500 Subject: [PATCH] Update --- refind-menu-generator | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/refind-menu-generator b/refind-menu-generator index d852c60..1f81cdf 100755 --- a/refind-menu-generator +++ b/refind-menu-generator @@ -9,19 +9,25 @@ function check_root { check_root ESP_PATH=$(bootctl --print-esp-path) +echo $ESP_PATH KERNEL_DIR="$ESP_PATH/EFI/Linux" +echo $KERNEL_DIR theme=$(cat "$ESP_PATH/EFI/refind/refind.conf" | grep themes | cut -d"/" -f2) if [ -d $KERNEL_DIR ]; then - if [ -f "/etc/kernel/cmdline" ]; then + if [ -f "$ESP_PATH/EFI/Linux/cmdline.txt" ]; then + CMDLINE=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "$ESP_PATH/EFI/Linux/cmdline.txt") + elif [ -f "/etc/kernel/cmdline" ]; then CMDLINE=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline") else CMDLINE=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' -e 's/initrd.*$//g' "/proc/cmdline") fi + echo $CMDLINE + manual_conf=$(mktemp) template="/etc/refind-menu-generator/menu-template.txt"