This commit is contained in:
Valeria Fadeeva 2023-08-13 12:09:21 +05:00
parent be4198efcd
commit d8c665cf2a
1 changed files with 7 additions and 1 deletions

View File

@ -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"