From 40db80a2cade22824873d6ff1f09c5fd1c66c7fd Mon Sep 17 00:00:00 2001
From: Boris Yumankulov <boria138@altlinux.org>
Date: Sun, 11 Aug 2024 18:22:00 +0500
Subject: [PATCH] add-kernel-options: fixed adding if
 GRUB_CMDLINE_LINUX_DEFAULT in double quotes (eterbug #17553)

---
 bin/epm-kernel_update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/epm-kernel_update b/bin/epm-kernel_update
index 4f7a81f6..0c8dca38 100644
--- a/bin/epm-kernel_update
+++ b/bin/epm-kernel_update
@@ -123,7 +123,7 @@ kernel_options_add () {
             if [ $bootloader = "systemd" ]; then
                 sed -i "/^$options/ s~\$~ $search_string~" "$entry_file"
             else
-                sed -i "s|^\($options'.*\)'\$|\1 $search_string'|" "$entry_file"
+                sed -i "s|\(^$options[\"']\)\(.*\)\([\"']\)|\1\2 $search_string\3|" "$entry_file"
             fi
             echo "Added '$search_string' to the kernel boot parameters in $entry_file"
         fi
-- 
2.24.1