Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37736285
en ru br
Репозитории ALT
S:1.77-alt3
5.1: 1.36-alt1
www.altlinux.org/Changes

Группа :: Система/Настройка/Загрузка и инициализация
Пакет: os-prober

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: os-prober-1.77-alt-grub2-skip-30_os-prober-parsing.patch
Скачать


From a1b1445158a0cc9194727172358ccbd817a2dff0 Mon Sep 17 00:00:00 2001
From: Nikolai Kostrigin <nickel@altlinux.org>
Date: Tue, 10 Mar 2020 11:35:30 +0300
Subject: [PATCH] 40grub2: skip 30_os-prober section parsing to avoid cross
 system menu items
---
 linux-boot-probes/mounted/common/40grub2 | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
diff --git a/linux-boot-probes/mounted/common/40grub2 b/linux-boot-probes/mounted/common/40grub2
index f747d0c..0e430ba 100755
--- a/linux-boot-probes/mounted/common/40grub2
+++ b/linux-boot-probes/mounted/common/40grub2
@@ -11,6 +11,7 @@ found_item=0
 
 entry_result () {
 	if [ "$ignore_item" = 0 ] && \
+	   [ "$ignore_section" = 0 ] && \
 	   [ -n "$kernel" ] && \
 	   [ -e "$mpoint/$kernel" ]; then
 		result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
@@ -96,6 +97,24 @@ parse_grub_menu () {
 			"}")
 				entry_result
 			;;
+			"###")
+				# sections are delimited with triple octothorpe
+				# avoid parsing 30_linux section of grub.cfg
+				# as there is no good to mess with intersystem
+				# boot menu items provided there
+				if [ "$4" = "###" ] && [ "$(echo "$3" |grep "30_os-prober")" != "" ]; then
+					case "$2" in
+						BEGIN)
+							ignore_section=1
+							debug "Skip 30_os-prober section: ON"
+						;;
+						END)
+							ignore_section=0
+							debug "Skip 30_os-prober section: OFF"
+						;;
+					esac
+				fi
+			;;
 		esac
 	done
 
-- 
2.25.1
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin