Received: from mx01.lytzenitmail.dk (mx09.lytzenitmail.dk [185.147.72.157]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id A4D9A7819AA for <~alpine/devel@lists.alpinelinux.org>; Thu, 24 Oct 2019 10:02:20 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CsAgA0drFd/ykef2RlHQEBAQkBEQU?= =?us-ascii?q?FAYFnCAELAYIfgUAgEiqMSmCFdoIfiW6HY4dRgXsJAQEBAQEBAQEBGxoCAQG?= =?us-ascii?q?EQIM9JDQJDgIMAQEBBAEBAQEBBQRthGtYhVABgScEAwECfiGDI4JSJQQBqw2?= =?us-ascii?q?GWYInGgKFIhCDKoE4EIE2AYwOGIFAP4RhhA5XLYR/IgSWNA2XIoIug0aRf4I?= =?us-ascii?q?7i3ADEIsUj3maBjmBWE04gydQEJFiPzOBBYxOglsBAQ?= X-IPAS-Result: =?us-ascii?q?A2CsAgA0drFd/ykef2RlHQEBAQkBEQUFAYFnCAELAYIfg?= =?us-ascii?q?UAgEiqMSmCFdoIfiW6HY4dRgXsJAQEBAQEBAQEBGxoCAQGEQIM9JDQJDgIMA?= =?us-ascii?q?QEBBAEBAQEBBQRthGtYhVABgScEAwECfiGDI4JSJQQBqw2GWYInGgKFIhCDK?= =?us-ascii?q?oE4EIE2AYwOGIFAP4RhhA5XLYR/IgSWNA2XIoIug0aRf4I7i3ADEIsUj3maB?= =?us-ascii?q?jmBWE04gydQEJFiPzOBBYxOglsBAQ?= X-IronPort-AV: E=Sophos;i="5.68,224,1569276000"; d="scan'208,223";a="2955380" Received: from unknown (HELO sv900pomx007.lytzenitmail.dk) ([100.127.30.41]) by mx01.lytzenitmail.dk with ESMTP; 24 Oct 2019 12:02:19 +0200 Received: from lb1.localnet (0120600178.0.fullrate.ninja [90.185.80.191]) by sv900pomx007.lytzenitmail.dk (Postfix) with ESMTPSA id 890781F8 for <~alpine/devel@lists.alpinelinux.org>; Thu, 24 Oct 2019 12:02:19 +0200 (CEST) From: Lars Johannsen Reply-To: laj@it.dk To: ~alpine/devel@lists.alpinelinux.org Subject: patch,unmaintained main/compat-pvgrub: may write to wrong file Date: Thu, 24 Oct 2019 12:02:15 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.29.6; KDE/4.2.4; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201910241202.15717.laj@it.dk> Content-Type: Multipart/Mixed; boundary="Boundary-00=_naXsdGSjqL4UhNi" --Boundary-00=_naXsdGSjqL4UhNi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi While browsing aports i saw this bug. Im not using this package and it seems to be unmaintained, but anyway here is a patch to prevent it from writing to the wrong file. --Boundary-00=_naXsdGSjqL4UhNi Content-Type: text/x-patch; charset="us-ascii"; name="0001-main-compat-pvgrub-prevent-output-to-wrong-conf-file.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-main-compat-pvgrub-prevent-output-to-wrong-conf-file.patch" From 9394fd8e5e672bdb4b3a30ffc59c5fdb628c5ca2 Mon Sep 17 00:00:00 2001 From: JailBox Date: Thu, 24 Oct 2019 00:23:03 +0200 Subject: [PATCH] main/compat-pvgrub: prevent output to wrong conf-file if "$myconf" defines/redefines "$conf" the generated output would go to the wrong file I.e. >echo "conf=/boot/mybootdir/extlinux.conf" >> /etc/update-extliunx.conf /sbin/update-extlinux will honor this, while update-pvgrub would write to the wrong config file. So postpone presetting "$conf" until "$myconf" has been source'd --- main/compat-pvgrub/update-pvgrub | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/compat-pvgrub/update-pvgrub b/main/compat-pvgrub/update-pvgrub index 56594a337b..5293f5081a 100755 --- a/main/compat-pvgrub/update-pvgrub +++ b/main/compat-pvgrub/update-pvgrub @@ -5,7 +5,6 @@ default=0 timeout=5 verbose=0 -conf=/boot/grub/menu.lst myconf=/etc/update-extlinux.conf # read in extlinux settings @@ -13,6 +12,8 @@ if [ -f "$myconf" ]; then . $myconf fi +conf=/boot/grub/menu.lst + everbose() { if [ "$verbose" = "0" ]; then return -- 2.22.0 --Boundary-00=_naXsdGSjqL4UhNi--